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...

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...

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...

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 ...

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...

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...

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...

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...

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...

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.