user3891275
user3891275

Reputation: 48

Implement Date Picker inside layout not as dialog

I need date picker inside layout not as Dialog. I searched but getting only about dialog. Is there any way to implement date picker in layout design ?

Upvotes: 2

Views: 605

Answers (1)

Hareshkumar Chhelana
Hareshkumar Chhelana

Reputation: 24848

Try this way,hope this will help you to solve your problem.

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="center">

    <DatePicker
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:endYear="2100"
        android:startYear="1900"
        android:calendarViewShown="false"/>

</LinearLayout>

Upvotes: 3

Related Questions