Android Switch Button Custom design - android

I am developing an app that can post two kinds of questions. to switch views i need a switch button on the TOP. i need help to customize my switch button like following image.

I used below gihub library for this type of button
https://github.com/kyleduo/SwitchButton
Advantage:
customize as per color you want
with good animation of switching button

Related

How to create a three way switch in android like google TEZ app?

I'm trying to create a switch,which on swipe up will have to perform an intent and on swipe down should start another intent.the problem now is,I couldn't show the movement of switch up and down.Can anyone help to show the switch movement on swiping(example google Tez App)
There is no standard UI element which will has 3 toggle state. However if you want to implement it you can design your own.
You can think of a Seekbar. Seekbar has same type of slider. You can customize the slider as per your need.
Using .setMax(2); which means that the seekbar has only 3
positions/steps.
Using .setProgress(1); will set the starting position of the
seekbar.
progressChanged(..) method you can change the drawable background with .setBackgroundDrawable(...) and even you can customize the thumb(Switch like circle button) by setting image as .setThumb(...)
If you even want to change the position of the slider you can implement a Click event handling and there change the position of the slider with .setProgress(); and if progress equals the fixed value (as there are only 3 possible values) perform your required operation.
P.S: I think this could be achieved by the above steps, as there are no standard UI element for the one you asked.. Hope it helps.

how to mimic android checkbox using button and state drawables

I want to use checkbox in RemoteViews but it does not support Checkbox object, so I think that I can achieve a similar effect using Button with custom state-list drawables. Basically I want an on/off switch which toggles on click and looks like a Checkbox.
I believe I am not the only one having this requirement so maybe someone has already made this checkbox-like button before. Please share with me the xml or point me in a direction. I don't have 100% understanding of drawables but I can find a way through it if I am heading in the right direction.
One shortcut I could take is to use an ImageButton and then alternate the images of checked/unchecked states programmatically, but I think inherent state changes would be faster.

How to make pop up screen without images in android?

Can you please tell me how to make this type of pop up? I do not need to design own component in drawable. I don't have much knowledge in Android.
1) First there is Title with blue background .
2) Second there is scrolling list view (without image) and buy button (without image).
Is it possible?
I Googled it to find out if we can make own button like that with some style?
Here is my image
You have to use a Dialog/Pop up in combination with a ListView you have to google that up because its a complex theme.
good look
Start from http://developer.android.com/guide/topics/ui/dialogs.html. You have to implement your own custom dialog layout, likely using a ListView (http://developer.android.com/guide/topics/ui/layout/listview.html).

Custom switch button using textView

I created custom switch button using two textview components. Is there any easy way to give one element on the another using OnClickListener ?
Example:
Why did you make your own? Android already provides Switches where you don't have to worry about any of this stuff since it is already implemented. Specifically you want the Toggle Button (changes to a switch button in Android 4.0+).
This way you will be providing users controls which are specific to their platform and match other similar applications that they use.

How to develop a windows way toggle button in android?

I need to design a windows kinda toggle button for my android application. I dont know which one to use. I tried using SeekBar & ToggleButton. I am not able to simulate the same way.
When you click it, it will slide to the other end. Not the exact way of slider.
When you click it during if it is off. It will slide to the other end and make it enabled.
Is there a way in SeekBar that i can achieve.
For the interface i am gonna use the below icon
Maybe Switch would suit you http://developer.android.com/reference/android/widget/Switch.html ?

Categories

Resources