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...
androidandroid-jetpack-composematerial-components-androidjetpack-compose-navigationandroid-jetpack-compose-scaffold
Villein asked 24/1, 2022 at 8:41
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:...
Ghiselin asked 20/4, 2015 at 2:41
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...
Seifert asked 25/9, 2019 at 2:32
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...
Descendant asked 31/7, 2020 at 12:9
11
Solved
I am currently using Material Design TextInputLayout OutlinedBox as shown below:
<android.support.design.widget.TextInputLayout
style="@style/Widget.MaterialComponents.TextInputLayout.Outlin...
Transcendentalism asked 7/11, 2018 at 22:31
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...
Viscacha asked 9/8, 2020 at 15:41
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...
Pfeffer asked 26/8, 2019 at 15:51
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...
Hygiene asked 18/10, 2018 at 17:52
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"
...
Capitalistic asked 15/12, 2014 at 12:28
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...
Kislev asked 16/1, 2019 at 17:32
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 ...
Swaim asked 4/5, 2020 at 5:22
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...
Higgler asked 9/12, 2019 at 12:24
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" ...
Clerk asked 5/9, 2018 at 1:6
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"...
Coventry asked 7/10, 2019 at 18:18
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 ...
Total asked 23/10, 2019 at 19:13
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...
Ramekin asked 9/3, 2021 at 11:41
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....
Bermudez asked 28/6, 2018 at 18:17
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...
Bosket asked 15/4, 2020 at 16:49
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....
Tiphane asked 8/10, 2012 at 6:46
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&...
Hanleigh asked 22/4, 2020 at 13:0
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...
Collis asked 5/9, 2019 at 13:54
© 2022 - 2024 — McMap. All rights reserved.