Reputation: 3928
I have been trying to use a DatePicker
but there is a strange problem in the UI rendering of it.
Below is the screen shot of the UI:
Whereas I want it like below:
Has anyone seen this before? How can I solve it?
Below is the XML layout:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity" >
<DatePicker
android:id="@+id/dpResult"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</RelativeLayout>
Upvotes: 1
Views: 325
Reputation: 2198
If you don't want the full calendar view and just want to see the spinners on the date picker, use the calendarViewShown attribute and set it to false. If the DatePicker is still oddly rendered, it might indicate that you have set some unnecessary attributes in the app's theme.
Upvotes: 1