I'm trying to decide whether to use a switch or toggle for setting an alarm I'm my android application. On fairly new to android and don't know or quite understand all the ins and outs of the frame work. What would be the disadvantages of choosing to trigger the alarm with a switch over a toggle, or vice versa? Is there a slide toggle available in android framework?
相关问题
- Switch String with Enum variables
- Preventing relayout on hiding status bar (faking S
- integer to word conversion in java using map conti
- GridLayoutManager spacing is not consistent
- How do I make my full-screen overlay remain full-s
相关文章
- How to set include background color in android
- requestLayout() improperly called by CollapsingToo
- go tutorial select statement
- How to make tab title alignment to left in TabLayo
- Android Studio not identifying xml file as layout
- Android drawable-hdpi-night folder
- Multi line Edit Text and first letter capitalizati
- Is there a tools attribute for ImageView content i
The first thing you need to keep in mind is since which API do you want to compile your app?
Toggle Buttons are available since API 1 and Switches are only available since API 14.
Besides that is just a simple decision, which one is the best option for user interface/design In my opinion Switches give a clear indication of what is currently selected.
Yes a switch can work as a slide toggle.
The code is very simple, you can basically use the same thought for these two buttons.
Here is an example of a Switch Button
Here's an example of a toggle Button