Hassan Mokdad
Hassan Mokdad

Reputation: 5902

Built-in date time picker control in Android that looks like the datetime picker of the Calendar Application

Is the control shown in the image below built-in in the Android Framework or it is a custom control. If it is custom control, should it be built using a button with background that pops a calendar dialog on click?

snapshot

Thanks

Upvotes: 0

Views: 1015

Answers (1)

user658042
user658042

Reputation:

These are just normal TextViews with a custom background selector and an OnClickListener that triggers the dialog.

If you want to know how a certain view or layout is built, you can use a tool called hierachyviewer (which I used here too). It shows the view hierachy of running apps on your device and is included in the Android SDK in your ANDROID_SDK/tools directory. The program is a bit unintuitive at first, but certainly a useful thing to know. See the documentation for more information about this.

Upvotes: 1

Related Questions