android - How to fix DatePicker Design -
i'm having issues datepicker design. i'm having different design when i'm seeing on eclipse screen , when run on emulator shows me different design. screenshots , code below.
<datepicker android:id="@+id/added_date" android:layout_width="match_parent" android:layout_height="match_parent" android:calendarviewshown="false" android:soundeffectsenabled="false" />
code i'm using in values/styles.xml
. if don't use code whole different datepicker.
<item name="android:datepickerstyle">@android:style/widget.datepicker</item>
eclipse screenshot:
emulator screenshot:
this result of android os version running: later 4.0 (or 3.x holo) , up, the former 2.x , below. style dependent on os version: instead of relying on sdk, might use third party library (where style defined , not dependent on os version: here https://android-arsenal.com/search?q=date+picker might want.
note can change style reflect particular os version in preview, looking for android icon number next it, , selecting os version want preview reflect.
if don't want use third party library, can force style of datepicker rewritting theme style, reference check post out: datepicker different style activity
Comments
Post a Comment