Questions tagged [materialbutton]

60 questions
1
vote
1 answer

Mat button toggle group component is not working

I am building an application which requires mat button toggle group (material component) and this is the code,
1
vote
1 answer

Material Button icon is not aligned properly when iconPadding is small

Create a MaterialButton with following attributes:
Amir
  • 1,628
  • 20
  • 28
1
vote
2 answers

MaterialButtonToggleGroup remove default border

I am new to android development and I need some help removing the borders from the MaterialButtonToggleGroup. Any help is appreciated Edit
mhassan
  • 83
  • 5
1
vote
0 answers

android/kotlin : Material Button show a grey box and then the box disappear

short clip of the issue In the clip above you will be able to see the problem better. Switching between Fragments user can see on the icon on the material button a grey box shaped element for short time. I tried using both the emulator and a real…
1
vote
1 answer

How do I get the listener from the MaterialButton.addOnCheckedChangeListener { "as a lambda" }

I have some MaterialButtons which changes checked state (in a toggle group scenario). My plan is to listen to the Checked status through MaterialButtons addOnCheckedChangeListener but I need to remove the listener when some conditions occure, how do…
Roar Grønmo
  • 2,926
  • 2
  • 24
  • 37
1
vote
0 answers

Android custom button with MaterialButton-like semi-transparent ripple

I created custom button based on a MaterialButton that is semi-transparent (primaryColorDisabled) when pressed and disabled. Now, I would like to have its ripple effect to turn the button from its primaryColor to the primaryColorDisabled instead of…
GrzegDev
  • 135
  • 1
  • 10
1
vote
1 answer

Button Doesn't Show Correct Color - Android Studio

In my Android Studio application, I have a button for which I set a drawable as the background. The drawable rounds the corners and changes the color of the button. However, when I look at the resulting design of the activity, the color I want…
1
vote
2 answers

Setting perfectly circular rounded corners on a MaterialButton in XML

So I have been trying to find a way to make a MaterialButton from the Material Components library have perfectly rounded corners. What I mean by this is effectively they have a corner size of 50% the height of the button. In some of the…
1
vote
1 answer

Flutter- per my code how to make material button invisible on swiping left and re-appear on swiping right

I am creating an APP which has a lot of emphasis on the image in the background as such, their is text in arabic on that image per line and I want to add "material buttons" on top of this text. I was able to do this ...but then I want the button to…
1
vote
1 answer

How to get checked button position in Android MaterialButtonToggleGroup

I have defined an MaterialButtonToggleGroup with 2 MaterialButton in my xml, in this way:
1
vote
1 answer

android, MaterialButton button color changed after adding style Theme.MaterialComponents.DayNight

having a MaterialButton, with style:
lannyf
  • 9,865
  • 12
  • 70
  • 152
0
votes
1 answer

How to create material button class in flutter

I'm currently creating an application and there's a lot of button that is needed. Is there a proper way to create it? I tried creating class for it but I've encountered multiple errors while creating it specifically in the Material Page Route part.
Yoke
  • 3
  • 2
0
votes
1 answer

MaterialButton wider than it should be warning

I use in my Android app, xml files to render the UI. In my xml files I use Google's MaterialButton from com.google.android.material.button to render a button at the bottom of a screen. More specifically I define it in a ConstraintLayout like this: …
Thanasis M
  • 1,144
  • 7
  • 22
0
votes
0 answers

Flutter MaterialButton not displaying after running flutter run --release or building apk

I'm trying out the flutter MaterialButton to give button gradient and custom positioning of icon and text. In debug mode, I get the button displaying but in release mode, the button isn't rendered. Any help would be appreciated. Release Mode Debug…