How to set the preference for displaying the selection timer widget via XML

First of all, I’d like to say that I’ve been working on Android for about a week now, so I think you can consider me a newbie! Therefore, I apologize in advance if the solution is too simple, but I can assure you that I conducted my research before publication here and have not yet found a suitable solution (or maybe I do not understand it completely!). Nevertheless, having a lot of fun and just want to solve this problem and study, so here it goes ...

application

The application I'm developing is essentially a reminder service, and I'm currently working on a preference screen .

Problem

I would like the user to be able to specify a time when he will be reminded daily. I want this selection to be made through the settings screen. This is how my settings screen looks ...

My settings screen

My question

Ideally, every time the user selects the preference "Alarm time", I would like the following to appear (this is a screenshot of the preference from another application - PillReminder).

Preference using the Time Picker widget (taken from another application - "PillReminder")

: ? , XML, Java. , ? , , , .. , , .

, !:)

+3
2

: ?

, , DialogPreference, TimePicker.

, XML, Java.

, , XML. DialogPreference, , , ( ) SharedPreference.

My CWAC ColorMixer ColorPreference, , , .

+2

:

http://www.twodee.org/blog/?p=1037

, DialogPreferences, . , !

+1

Source: https://habr.com/ru/post/1793237/


All Articles