All Questions
Tagged with material-components-android android-layout
139
questions
-1
votes
1
answer
40
views
Switching between list view and grid view in android efficiently with smooth transition
I am trying to achieve a view switch that enables user to switch between "List view" and "Grid view" in Android. However, I have achieved this but I am not satisfied with results ...
0
votes
0
answers
34
views
Android BottomSheetDialog: Background blinks between bottom sheet and keyboard when keyboard is expanding (XML)
I have simple bottom sheet with one input field. When it opens I also show keyboard. Here is the sample code.
MainActivity
class MainActivity : AppCompatActivity() {
override fun onCreate(...
0
votes
0
answers
32
views
Tab ItemIndicator not visible - Android TabLayout
I'm trying to display a white tab indicator that's 1 dp in height and extends the full width of the tab.
However, nothing is being displayed except the text
layout.xml
<com.google.android....
0
votes
1
answer
56
views
Android OutlinedBox style is not work in TextInputLayout
I have searched and tried many solutions, but it still not work.
(Still shows "FilledBox" style)
What is the problem in my code?
input_layout.xml
<com.google.android.material.textfield....
0
votes
0
answers
276
views
Have a Button on top of a BottomSheet
I'd like to constrain a Button to the top of a BottomSheet so that when i drag the BottomSheet the button's height follows the BottomSheet's
Like that:
<androidx.coordinatorlayout.widget....
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 ...
0
votes
1
answer
279
views
How to create a custom text input layout like material 3 in android, Because for me existing material 3 and material 2 not satisfying the requirement
I got requirement from designer for custom edit text or input text layout, so for that i tried to look in to MD2 and MD3 documentation, But i didn't found anything useful.
This is the requirement, ...
1
vote
1
answer
73
views
How To Do This With Bottom App Bar In Android XML
This is my set up for BottomAppBar and it will hide if i scroll down, and show if i scroll up.
And I am finding syntax can show it by code. Is this possible ?
Here is set up for BottomAppBar
I read ...
1
vote
1
answer
526
views
How to create a docked/cradled fab in Material 3 Bottom App Bar similar to Google Keep
Recently, I have been trying to create a docked/cradled fab in a bottom app bar in Material 3. While material 2 supports this as default, material 3 has placed the fab within the bottom app bar ...
2
votes
1
answer
594
views
How to change the selected background color with the same opacity on MaterialButtonToggleGroup
Here is the XML code of My MaterialButtonToggleGroup
<com.google.android.material.button.MaterialButtonToggleGroup
android:id="@+id/type_toggle"
android:layout_width=&...
1
vote
1
answer
842
views
migrate from MaterialComponents to Material 3, how to use my old custom colors for new version of material
I am trying to migrate my current app from MaterialComponents to use newset version Material3 I want to use my old colors (custom colors) for the toolbars and navigation drawer but I am a little bit ...
0
votes
2
answers
222
views
Android remove focus of TextEdit when Enter is pressed
I have some TextEdit inside a LinearLayout and I want to remove the cursor after I hit enter on them.
Code
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:...
0
votes
1
answer
71
views
Make TextView with drawable expand inside CardView
I'm trying to make a TextView that contains a text and a drawable expand/scale based on the size of the TextView. My current code:
<?xml version="1.0" encoding="utf-8"?>
<...
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
1
answer
481
views
Android: Buttons in MaterialButtonToggleGroup not showing on screen
I am trying to add two buttons to my layouts using the MaterialButtonGroup tag however they do not show up in my app or in the design view of Android Studio.
This is in my build.gradle. I've tried a ...