material-components-android Questions

1

I know about difference between TextView and AppCompatTextView. But what about TextView and MaterialTextView? What are the nuances? And when we need to use MaterialTextView?
Karykaryl asked 2/2, 2022 at 8:52

1

Solved

I want to use outlined and filled icons based on selected state in NavigationBar just like google maps app, using jetpack compose. In case of xml we use selector so what do we use for compose ? Her...

2

Solved

What I did: Added implementation 'com.google.android.material:material:1.1.0' in dependencies Set Theme.MaterialComponents.Light.Bridge as parent to app theme <style name="AppTheme" parent=...
Rioux asked 26/3, 2020 at 15:28

10

Solved

I want to have appcompat v21 toolbar in my activity. But the toolbar I'm implementing is overlapping below status bar. How can I fix it? Here is the activity layout xml: <LinearLayout xmlns:...

6

Solved

I am trying to change the background color of a Button. I'm in Kotlin on SDK 21 on emulator. A View and a Button are declared in the layout XML file <View android:id="@+id/myview" android:la...

5

I'm trying to use a Material Button where I want an icon to the very left, and then some text in the center. But when I put in the icon on the left for instance, I can clearly see the text being pu...
Discourtesy asked 21/6, 2019 at 9:15

4

Solved

What is the difference between these 2 objects (SwitchCompat and SwitchMaterial)? I have tried them and visually they are identical. By the way, why did they remove the Switch class? Do you know wh...

11

Solved

I am currently using Material Design TextInputLayout OutlinedBox as shown below: <android.support.design.widget.TextInputLayout style="@style/Widget.MaterialComponents.TextInputLayout.Outlin...

6

I've this issue, I don't know where it come from, I've created this buttons with custom background, but the background color talking the primary color and cannot change it unless change the primary...

3

Solved

Using TextInputLayout from Material Design library we can use various end icon modes for password redaction, text clearing and custom mode. Furthermore, if we use any of Widget.MaterialComponents.T...

5

Solved

I want to have "Sign in with Google" button with white background and colored icon, but when I use this Google icon always gets tinted. <android.support.design.button.MaterialButton style="@s...

14

Solved

The new floating action button should be 56dp x 56dp and the icon inside it should be 24dp x 24dp. So the space between icon and button should be 16dp. <ImageButton android:id="@+id/fab_add" ...

2

I'm trying to use these material text fields with the box outline style. I see that there's a property called boxStrokeColor which lets me set the stroke only when the text field is highlighted whe...

4

I am using Material Design Button in Android project. I want to have the create a Progress Indicator on button when it's pressed. It seems that the Material Design doesn't have the support yet for ...

4

Solved

I'm trying to make one rounded corner of ImageView like in the picture below but with bottom right corner. Tried using background shape but it's not working at all. All images loaded by Glide. Shou...

4

Solved

I have a very specific issue for changing the outline of the textbox for TextInputLayout when it's unfocused. I can't seem to find an attribute to change the color for the border of my "unfocused" ...

4

Solved

I'm using latest material components - 1.1.0-beta01. When ExtendedFloatingActionButton expands, its height also reduces. Here is how xml layout looks: <?xml version="1.0" encoding="utf-8"...

3

Solved

I am trying to create a button with an icon in the center. The top and bottom part of the circle are a little flat. Is there a way to do this without using corner radius? Here is my layout for the ...

2

The project supports RTL; Arabic in particular. The requirement is that all numbers must appear in English format even when language is selected as Arabic Locale, the way we achieve it everywhere i...

9

Solved

How do I set the selected com.google.android.material.chip.Chip color? I don't want it to be the default gray. This is a single selection chip group. Original documentation here <com.google....

2

When I added ChipGroup and Chips to XML, first it gave me rendering issue which caused activity crash. I solved it by changing the support library version in the gradle.app from implementation 'com...

0

I want to create selectable text using Jetpack Compose. Sample code is as following class MainActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(...
Farthermost asked 26/6, 2021 at 13:55

4

Solved

I want to create a Circluar Determinate ProgressBar, the kind which shows the Progress in the center of the Bar. Is there any default way to create this, or will i have to create my own custom one....

4

Solved

My code: <Button android:id="@+id/button_one" style="@style/ButtonStyle" android:text="@string/button_one" /> <style name="ButtonStyle"> <item name="android:textSize">32sp&...

5

Solved

I want to change the date picker of my project to the date picker provided by the Material Components for Android, but it is not working. This is the code I've tried: MaterialDatePicker.Builder&l...

© 2022 - 2024 — McMap. All rights reserved.