1,359 questions
0
votes
0
answers
66
views
How to make a Tooltip using TooltipDrawable in java?
Up to now, there is no straightforward and official way for creating a Material Tooltip in java. I know that one can create a TooltipDrawable using:
TooltipDrawable tooltipDrawable = TooltipDrawable....
0
votes
0
answers
30
views
Stop MaterialSwitch's Handle from getting smaller when disabled
I'm using the MaterialSwitch in my Android app as follows
<com.google.android.material.materialswitch.MaterialSwitch
android:layout_width="wrap_content"
android:layout_height=&...
1
vote
1
answer
64
views
Android MaterialButtonToggleGroup buttons are getting offset when they have more than one line of text
I am using a MaterialButtonToggleGroup with MaterialButton buttons in it. I am trying to fit 2 lines of text into some of the buttons, but the buttons get shifted down a bit if they have more than one ...
1
vote
0
answers
23
views
How to Change TabLayout Color In Android xml
I'm looking forward to change the color of this part of TabLayout When user swipes but there's not more items to swipe to.
color
This is My xml:
<com.google.android.material.tabs.TabLayout
...
1
vote
0
answers
40
views
Jetpack Compose add custom themed colors to library
I develop library with composables. Composables have different foregone colors set for light and dark theme. For example backgroundColor, buttonColor, progressLineColor. I don't want library users to ...
0
votes
0
answers
34
views
How to level two TextInputLayout next to each other when one has END_ICON_CLEAR_TEXT and the other END_ICON_NONE?
Consider that:
Al2TextView inherits from TextView
Al2TextInputLayout inherits from TextInputLayout
Al2TextInputEditText inherits from TextInputEditText
When entering text into the second field (...
1
vote
1
answer
2k
views
Jetpack Compose TopAppBar with search bar embedded
I'm trying to implement something that I feel should be easy but I'm having a hard time.
I have a screen with a scaffold, topbar, and lazycolumn as content:
I'm using a M3 TopAppBar with a ...
1
vote
1
answer
73
views
Custom AppBar and Toolbar styles not applying in MaterialComponents Theme
I am trying to create a global custom style for the AppBar and Toolbar in my Android application using MaterialComponents. I want the styles to apply globally across all activities. However, the ...
0
votes
1
answer
107
views
Make Material CheckBox Checkmark Color Black Instead of Transparent
I like the animation and the teal color of the default Material 3 CheckBox. However, the checked checkBox on a white background is not easily readable for those that are color blind. I would like for ...
2
votes
1
answer
484
views
Why pull-to-refresh box disappears after navigating back to screen then swiping up/down or click?
I'm working on a Jetpack Compose application that implements a Material3 new pull-to-refresh (PullToRefreshBox) feature. However, I've encountered an issue where the pull-to-refresh box disappears ...
1
vote
1
answer
363
views
How to create a Composable that I can drag up and down on it to increase its height
I am required to create a UI in Jetpack Compose of a card that initially takes some constant height but the user can drag on it to increase or decrease its height and show more or less content. It's ...
0
votes
0
answers
353
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
vote
0
answers
88
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
61
views
How to show border on TextInputLayout in Android Kotlin without MaterialComponents support
How to show border on TextInputLayout in Android without MaterialComponents.
I have an AppCompatActivity using AppTheme.DialogTheme to show the Activity as a Dialog, but this configuration does not ...
2
votes
2
answers
1k
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
0
answers
60
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
97
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 ...
1
vote
1
answer
170
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 ...
0
votes
2
answers
278
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 ...
2
votes
2
answers
657
views
(BottomNavigationView) The style on this component requires your app theme to be Theme.AppCompat (or a descendant)
When using com.google.android.material.bottomnavigation.BottomNavigationView in my app layout, I get the following error:
Caused by: android.view.InflateException: Binary XML file line #25 in com....
0
votes
1
answer
872
views
How to make a mini player like YouTube Music or YouTube in Android Jetpack Compose while having bottom navigation bar?
Using Material3 design principle, I think (I may be wrong here) BottomSheetScaffold Composable should be used rather than ModalBottomSheet Composable, but the problem is that I didn't find any way of ...
2
votes
1
answer
375
views
Material Design SearchView has no method "setOnQueryTextListener"
I am struggling to implement material components search in my android app following this tutorial
I built a basic app with viewbinding, added implementation 'com.google.android.material:material:1.11....
1
vote
0
answers
54
views
AutocompleteActivity with Compose : IllegalArgumentException: The style on this component requires your app theme to be Theme.MaterialComponents
We are in the process of migrating our app from XML to compose and migrated a lot of areas in the app.
right now we need to implement Autocomplete from Google Places to one of our Compose screens ...
2
votes
0
answers
227
views
Android Compose Error for CoreTextField -> CoreTextField -> semanticsModifier
I get the following error when switching from Fragment to Compose view and this is experienced by many users.
I couldn't solve the error because I don't use TextField within that page or any page it ...
1
vote
1
answer
174
views
ShapeableImageView - Changing height results in cut-off corners when applying new ShapeAppearanceModel
My app needs to support multiple corner radius/aspect ratio combination presets which may be displayed in different orders depending on the user profile being displayed. For example, preset A has ...