P
P
prosto_anton2016-09-03 13:56:08
Android
prosto_anton, 2016-09-03 13:56:08

Why are some of the styles not being applied programmatically in Android?

Created style:

<style name="albums_content_container">
    <item name="android:numColumns">3</item>
    <item name="android:background">#ff0000</item>
    <item name="android:layout_width">match_parent</item>
    <item name="android:layout_height">wrap_content</item>
    <item name="android:scrollbars">none</item>
    <item name="android:overScrollMode">never</item>
</style>

When creating an element in the code, I try to apply this style:
new GridView(context, null, R.style.albums_content_container);

Some of the properties apply (scrollbars) and some don't (eg android:numColumns).
What could be the reason? According to the internet, my code should work.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
prosto_anton, 2016-09-03
@prosto_anton

This answer helped: stackoverflow.com/a/19690713/5829750

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question