I'd like to create a control that allows a user to choose a day of the week (Monday) and a time of day (1:00 PM) in my Android activity. Not been able to find any good posts on this?
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
I've combined a day of week and time picker in a single dialog.
You can check out the library here
You first create a listener:
Then you use the builder to show the dialog:
Hope you find it useful.
You could try to use some external library like android-betterpickers. It has, at least in my opinion, a great design:
https://github.com/derekbrameyer/android-betterpickers
OK, I think I figured it out. I just don't love this solution because the Spinner I use for the day of the week doesn't match the "theme" of the timepicker, so it looks really bad.
EDIT: I changed the layout for the spinner you can see it at the bottom of the post, looks much better now.
DayTimePickerFragment.java
picker_day_time.xml
spinner_item_day_picker.xml