All Questions
Tagged with material-components-android android
1,308
questions
0
votes
0
answers
40
views
Why could not inflate Behavior subclass com.google.android.material.bottomsheet.BottomSheetBehavior?
My intention is: when I press the buttom labeled "STANDARD BOTTOM SHEET", I want the Standard sheet dialog to be shown.
I'm trying to use a bottom sheet modal dialog, but for some reason, ...
-1
votes
0
answers
19
views
material3 TextInputLayout actual text overlaps with prefix when it's inside recycler view
I'm using TextInputLayout and TextInputEditText as item layout inside a recycler view. the recycler view has 9 items, the first 4 items that are shown have no problem, the problem is within items 5,6,...
1
vote
0
answers
18
views
How to change rounding of the Android Material range sliders
I haven't found any information on how to change both the active and inactive tracks corner rounding for Android Material range sliders ; how do I do that or work around it?
I have read:
Android ...
0
votes
1
answer
33
views
Must I use MaterialTheme.typography when using Jetpack Compose, or are there any alternatives?
Recently, I have switched to Jetpack Compose, I see that it's very convenient and faster when building UI with Compose. But I find it difficult and confusing to decide which style of Text should use ...
0
votes
0
answers
57
views
Why are Dynamic Colors not working on my android 14?
I want to use dynamic colors in my app with java and I use
DynamicColors.applyToActivitiesIfAvailable(getApplication());
to apply them, but colors doesn't change as in my phone's other apps
except ...
1
vote
0
answers
33
views
MaterialAlertDialog not showing singleChoiceItems nor multipleChoiceItems
I'm using Java to develop Android apps. In my current app, I want to create a custom alert dialog based on MaterialAlertDialogBuilder to reuse across the app and reduce repetitive code. The problem is ...
1
vote
1
answer
109
views
LargeTopAppBar is collapsible even if the inner content is not scrollable in Jetpack Compose
I am trying to implement a screen that uses TopAppBar and some items with LazyColumn.
However, LargeTopAppBar is collapsible even if the inner content is not scrollable.
STEPS
I made a scrollBehavior ...
0
votes
1
answer
38
views
MaterialAutoCompleteTextView automatically shows dropdown when changing theme
I'm using MaterialAutoCompleteTextView to display a dropdown list for selecting a theme.
xml:
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/...
0
votes
0
answers
42
views
Transition from Activity to Fragment
How to create a transition from an Activity to a Fragment?
I specificly tried to create a MaterialSharedAxis transition from an Activity to a Fragment which did not work for me.
Sample Code:
// ...
-1
votes
1
answer
198
views
Fatal Exception: java.lang.UnsupportedOperationException: Failed to resolve attribute at index 5: TypedValue{t=0x2/d=0x7f040109 a=23}
I am facing an error message which triggers whenever I click in a MaterialDatePicker. I think it is related with the ThemeOverlay but I have no idea how can I get rid of it.
This is the error message:
...
-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 ...
2
votes
1
answer
177
views
Updating Jetpack Compose broke dynamic colors
In my Android Project I was using the Compose BOM 2023.08.00 version, and now I updated to 2024.04.01, but after doing so, dynamic colors no longer work. Instead, it shows gray (which isn't the ...
1
vote
1
answer
118
views
Material Design scroll-away searchbar with recyclerview
I would like my Material Design Searchbar to scroll-away/collapse when scrolling down in my recyclerview. I followed the guidelines from here but I can't get it to work.
My activity XML:
<?xml ...
1
vote
1
answer
63
views
How do I set the checked icon of a Chip programmatically?
Is there any way to set a drawable xml asset in a chip programmatically?
Just playing around with chips, not forced to use them actually. I can easily swap, but i was wondering if that's possible or ...
0
votes
3
answers
173
views
How to Enforce ColorAccent in Dialog Buttons Across Different App Themes?
I expected the dialog's button text to use colorAccent.
However, in some app themes, the dialog's button text uses colorPrimary.
Here are my findings:
Theme.AppCompat.Light.DarkActionBar - Dialog's ...