Category : material-design

I am trying to set the text color of an AppCompatTextView using the setColor method and providing the color from a custom attribute in my theme, but it does not seem to work. The following is the exact code I am using binding.loginTextTv.setTextColor(R.attr.primaryMainColor) It works fine when I do something like binding.loginTextTv.setTextColor(R.color.primaryColor) How can I ..

Read more

On https://material.io/components/text-fields there is an interactive demo for Filled TextField. Label hint is centered inside input field and when you click on it and enter some text label moves app and text that you inputed is slightly below center(where hint previously was) Problem is that I am not able to reproduce this behaviour on Android ..

Read more

I have scenario as BottomSheetDialogFragment will pop up from below and ask to modify page, if user click yes or drag bottom sheet to top; first view(cl_collapsed_container) will gone by animation and new view will appear(cl_expanded_container) also with animation. I tried so many combination but could not accomplish. here is my xml; <androidx.coordinatorlayout.widget.CoordinatorLayout android:layout_width="match_parent" android:layout_height="match_parent"> ..

Read more

I am using Material Design and I have a problem with it. I have a group com.google.android.material.button.MaterialButtonToggleGroup which includes icon-only toggle buttons with style @style/Widget.App.Button.OutlinedButton.IconOnly. I am using style from documentation: <style name="Widget.App.Button.OutlinedButton.IconOnly" parent="Widget.MaterialComponents.Button.OutlinedButton"> <item name="iconPadding">0dp</item> <item name="android:insetTop">0dp</item> <item name="android:insetBottom">0dp</item> <item name="android:paddingLeft">12dp</item> <item name="android:paddingRight">12dp</item> <item name="android:minWidth">48dp</item> <item name="android:minHeight">48dp</item> </style> There is screenshot how it looks: ..

Read more