All Questions
Tagged with material-components-android xml
64
questions
0
votes
1
answer
224
views
How can I change corner radius in material button toggle group?
I want make Material Button Toggle Group Like this:
all rounded
But result is: half rounded
I've changed shapeAppearance (cornerSizeTopRight, ...) or cornerSize, but only the outer part of the buttons ...
1
vote
2
answers
139
views
How to Align Drawable / Icon to Right of Text in a Button?
In my Android app, I want to have a drawable ( or icon) immediately to the right of the button's text, but I'm facing an issue where the drawable is too far from the text, and the app:icon attribute ...
0
votes
0
answers
31
views
Start Icon in Materal Design 3's Input Text seems to be ignoring MinSize property
I've been trying to utilize leading icons in my input texts while developing a mobile app, however, I cant seem to resize the icon to match the size of the input text.
code 1:
result 1:
Also tried ...
3
votes
1
answer
1k
views
How to add two trailing icons on Material3 Search Bar on Android?
I want to add two trailing icons (one of them being the 3 dots menu icon) on my Material 3 Search Bar.
Examples:
Source: GitHub
and this:
Source: Material 3
But I can't find any way to do this nor ...
1
vote
1
answer
356
views
Custom shaped button inside of MaterialButtonToggleGroup
I'm trying to create a group for buttons (not radio buttons!), and I've stumbled upon: MaterialButtonToggleGroup
the result I'm trying to achieve should look something like:
however while trying to ...
0
votes
0
answers
114
views
Checkbox border color does not change
Im trying to change the border color, radius etc of Material Check box in styles.xml but it doesn't get changed.
Checkbox XML:
<com.google.android.material.checkbox.MaterialCheckBox
...
0
votes
1
answer
866
views
ChipGroup - setOnCheckedStateChangeListener - not triggerring
I'm trying to use ChipGroup in a project. I'm adding chip items manuelly. It's working perfectly fine. But when I'm trying to click it, setOnCheckedStateChangeListener is not triggerring. What am I ...
7
votes
2
answers
2k
views
How to use material 3 Switch in PreferenceFragmentCompat programmatically?
SwitchPreferenceCompat still retains the old Switch style, I know to be able to style it Material 3 in the following way:
theme.xml
<style name="Theme.Material3.Preference" parent="...
0
votes
0
answers
44
views
Android disable button for period of time but leave highlighted
I am using an array of MaterialButtons in an application. When one of the buttons is clicked, an asynchronous operation triggers. I want to disable all the buttons while the operation is still running ...
3
votes
1
answer
1k
views
Android Material Date Range Picker - How to change the text color of only the selected range dates?
I am attempting to reproduce this style with the Material Range Date Picker:
[Calendar date picker with all the selected days in white textColor. The unselected days have a black textColor]
This is ...
0
votes
0
answers
27
views
Squared non transparent background on custom input dialog
I have created a custom input dialog for my application, and in terms of funcionality it works, but every time it has a sort of square background which distones from the actual dialog content. I tried ...
0
votes
2
answers
193
views
Background adding more padding to Button
I have this simple XML file in my Android Studio. There are 2 buttons
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/...
0
votes
1
answer
111
views
Background for button not updating - Andorid
In my Android project, I have a button with a background of purple, but it is showing blue.
This is my code:
activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<...
1
vote
0
answers
31
views
android tabs allCaps works only for first tab
I'm trying to set my tabs text textAllCaps to false.
For some reason only firs tab has needed results, but the second is still all caps.
https://i.sstatic.net/tAMAy.jpg
I've set tabTextAppearance to ...
1
vote
2
answers
1k
views
How to make tabs items padding correctly?
I want to make custom tabs like this design in the image and I found an answer for that case on this question here but after applying it's solution I got the result in the image, what I want to do is ...