android-togglebutton Questions
1
I have the following xml:
<LinearLayout
android:id="@+id/ll_two_state"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_m...
Slim asked 12/2 at 16:10
2
Solved
I am trying to put a button toggle group in my project that behaves similarly to a radio button group, but does not look like a radio button group (ie when one button is selected, the others are de...
Spheroid asked 31/10, 2021 at 16:13
4
I'm using MaterialButtonToggleGroup to create selector buttons.
I want to change the background color of MaterialButton buttons. Its default color is light blue, and I want to change it to light gr...
Ungraceful asked 1/2, 2021 at 8:23
1
I can not able to change the background of the selected MaterialButton.
<com.google.android.material.button.MaterialButtonToggleGroup
android:id="@+id/toggleButton"
android:layout_wi...
Kind asked 15/3, 2021 at 8:30
3
Solved
If i am trying to add margin with layout_marginStart or layout_marginEnd but there is no effect on UI. I am not sure why layout_marginStart, layout_marginEnd not working with MaterialButton when i ...
Lawanda asked 16/4, 2020 at 10:28
8
I have ten toggle buttons. I want to save the state of five of those buttons when clicking the home button. But I want to save it only if the user has made a change to any of the buttons' state. Is...
Battledore asked 25/8, 2011 at 8:32
3
I want to use MaterialButtonToggleGroup with 2 MaterialButton. I want to display them with same width inside MaterialButtonToggleGroup
If I use match_parent then only one button will be displayed ...
Diggs asked 1/6, 2019 at 15:16
6
Solved
How do I implement the Toggle Buttons as specified in Material Design guidelines here?
Is it available out of the box from Android Design Support Library or is there any third party library availa...
Thorley asked 13/3, 2016 at 17:48
2
Solved
I am using MaterialButtonToggleGroup with single selection (only one button checked at a time). How to check if none of the buttons is checked?
toggleGroup?.addOnButtonCheckedListener { group, c...
Antrim asked 2/4, 2020 at 8:6
1
Not able to make the selected color of MaterialToggleButton to a solid color, only a transparent shade of color primary is shown.
I tried the below set of code and the out image is shown below.
B...
Zebu asked 6/3, 2020 at 5:25
4
Solved
Is there an option to make the MaterialButtonToggleGroup have a required selected button when using app:singleSelection="true"?
When clicking to a different button works fine (all other buttons a...
Inconsolable asked 16/5, 2019 at 8:21
3
Solved
I have a ToggleButton. I want the background to be clear, like in the default alarm app for the days of the week. The code below covers the toggle with the clear color. Is there any way to keep the...
Mcmillian asked 16/8, 2014 at 23:37
1
How can I create a toggle button that looks like this?
Currently I have the below:
<RadioGroup
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientatio...
Scorpaenoid asked 1/12, 2015 at 12:10
1
Solved
I have an EditText where I listen for changes in text:
editText.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after...
Acnode asked 21/10, 2015 at 11:17
1
Solved
I have a method like this:
ToggleButton toggle = ((ToggleButton)findViewById(R.id.toggle));
toggle.setTextOn("blah");
toggle.setTextOff("blahblah");
toggle.invalidate(); // doesn't work?
This me...
Vicegerent asked 17/1, 2015 at 12:50
1
© 2022 - 2024 — McMap. All rights reserved.