chymtt / ReactNativeDropdownAndroid

A simple wrapper for Android's Spinner in react-native
MIT License
62 stars 22 forks source link

Adding Styles #2

Closed Sh3rawi closed 8 years ago

Sh3rawi commented 8 years ago

Are there any plans to expose styling the dropdown menu (backgroundColor, fontSize,...) ?

chymtt commented 8 years ago

Sorry, currently I'm occupied with other work so I have no plan for that yet. But a PR is always welcome!

jforaker commented 8 years ago

I was able to add backgroundColor but color threw an error in the console.

@chymtt could you point me in the direction on how to implement a simple change in color for the text?

chymtt commented 8 years ago

@jforaker : To change the text's style, you should look to alter the item's layout, which is on line 54 of Dropdown.java

spinnerArrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);

I think you should start with making a custom layout for the dropdown item and then change the style from there. P/S: Btw, I think the appropriate attribute to change text's color in this case is textColor. Hope it helps