How can I set current date (Today’s date) to my local date. My timezone is GMT+07:00. I can just set only setSelection() date but can’t set current date. (Sorry for my any grammatical mistake and thank you in advance) Calendar image Answer I could be wrong, but I think you don’t need to worry about timezone at all. It’s all
Tag: material-design
How to add a badge above a button?
In my MainActivity class, I have this button: I now want to add a badge with the number 1, using Material Design (see the documentation). This is how I tried: but what I get is the error ‘attachBadgeDrawable(com.google.android.material.badge.BadgeDrawable, android.view.View, android.widget.FrameLayout)’ in ‘com.google.android.material.badge.BadgeUtils’ cannot be applied to ‘(com.google.android.material.badge.BadgeDrawable, android.view.View)’ Answer If you tried this on a device with <18 API this
How to remove the underline under TextInputLayout in Android Material Design?
I was trying to remove the underline from a material design component named TextInputLayout. I have tried several different answers from SO which didn’t work out for me so I decided to ask my own question. How can I remove this underline? XML: Answer As stated in the material design guideline, this is activation indicator of TextInputLayout. Check Activation indicator
Change PreferenceFragmentCompat dialog background color in Android
I recently started working with PreferenceFragmentCompat and MaterialComponents and noticed that in Dark mode, Dialogs generated by preferences like ListPreference always have that weird grey android background no matter how many background attributes I change in the style. (source: pocketnow.com) This I’ve tried: I’ve also tried with android:background and worked but it brokes everything. So I investigated a bit in-depth
How can I make the corners of my bottom sheet dialog rounded? [duplicate]
This question already has answers here: Round corner for BottomSheetDialogFragment (28 answers) Closed last year. I’m trying to make the top corners of my BottomSheetDialog rounded, but I haven’t had any luck with anything online. This is what I would like for it to look like: No matter what I’ve tried, I keep getting this: I’ve tried the method here
Android NavigationView vith rounded corners
I am designing a custom Drawer on Android, it must have rounded corners in top and bottom, I am first customizing top side and I find the problem that the background of the shape is not transparent. I have: (source: toile-libre.org) I need to build: (source: toile-libre.org) I would also like some help on how to round it on the
Persistent Bottom Sheet with rounded corners in Android crashes when used in a card view
I have created a persistent bottom sheet in android with the intent of displaying a ListView containing additional information about locations. I want the sheet to have rounded corners. I got a ton of results for modal dialog but none for persistent. Is it possible or should I use the modal version? As suggested in an answer here, I tried
Runtime Change Android material theme
I have one setting screen for change app themes at runtime. I know how to create material design theme. I have create one in my style.xml file Here is code of my style.xml: Now I want to change runtime app theme from green to purple or yellow. Anything can any one tell me how can I create a color picker