SimplicityApks / ReminderDatePicker

A Google Keep-like Date and Time Picker for reminders
Apache License 2.0
74 stars 26 forks source link

API 8 dark theme wrong button color #14

Closed chrisonline closed 9 years ago

chrisonline commented 9 years ago

On API 8 devices with dark theme the text on the button is white. Should be black.

I've fixed it on my side with adding a layout-v11 and change the xml in the layout folder. Instead of textColorPrimary I use primary_text_light_nodisable! The same as the standard API 8 uses on buttons.

layout-v11: <TextView android:id="@android:id/text1" style="?android:attr/spinnerItemStyle" android:singleLine="true" android:layout_width="match_parent" android:layout_height="wrap_content" android:ellipsize="marquee" android:textAlignment="inherit" android:textColor="?android:textColorPrimary"/>

layout: <TextView android:id="@android:id/text1" style="?android:attr/spinnerItemStyle" android:singleLine="true" android:layout_width="match_parent" android:layout_height="wrap_content" android:ellipsize="marquee" android:textAlignment="inherit" android:textColor="@android:color/primary_text_light_nodisable" />

SimplicityApks commented 9 years ago

I'm unable to reproduce this issue in my Froyo emulator, I see a dark button background and thus a white text makes perfect sense: reminderdatepickerapi8dark

I guess this occurs because of the older version of appcompat that you're using, or some skin an your device.

chrisonline commented 9 years ago

Ok strange. Because I see not a borderless button on api 8. Will check this. Sorry to bother you.

chrisonline commented 9 years ago

I don't get it why I see the standard spinner (button like) on API8 and your sample have spinner style of Android 4.x!

In reminder_date_picker.xml you don't set a "Appcombat Style" to the spinner. So why is it displayed in API8 like an Android 4.x spinner? Can you help?

SimplicityApks commented 9 years ago

I guess this is because the sample app uses <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> on all API levels. When you use a Theme.Light or something like that on older android versions, it will use the system drawables and not Appcompat's. So beware of having different styles.xml in values-v11 and values-v14! And it is just the drawable though, there will still be a dialog instead of a popup menu on Froyo.

You don't need to set a specific style for your widgets, having the theme set up correctly should work on its own.

chrisonline commented 9 years ago

I have