How to change android button text color globally in theme

<style name=”AppTheme.Base” parent=”Theme.AppCompat.Light.DarkActionBar”> <item name=”android:textColor”>#yourcolor</item> <item name=”android:buttonStyle”>@style/ButtonColor</item> <item name=”colorButtonNormal”>@color/buttonColor</item> </style> <style name=”ButtonColor” parent=”@android:style/Widget.Button”> <item name=”android:textColor”>@color/yourcolor</item> </style> android:textColor This should help you change the text color globally.

Material design Spinner using TextInputLayout.OutlinedBox styling

I am assuming you want to have an Exposed drop-down menu inside the TextInputLayout I had the same problem, what you can do is use AutoCompleteTextView inside your TextInputLayout as in the following in the XML. here’s an example of how I approached the issue. <LinearLayout android:layout_width=”match_parent” android:layout_height=”wrap_content” android:orientation=”horizontal” android:paddingRight=”30dp” android:paddingEnd=”30dp” tools:ignore=”RtlSymmetry” android:layout_margin=”5dp”> <ImageView android:layout_width=”30dp” … Read more

How to create a circular outlined Material Button in Android?

You can use the app:shapeAppearanceOverlay attribute to define the corner size. You can use the 50% value. <com.google.android.material.button.MaterialButton android:layout_width=”50dp” android:layout_height=”50dp” style=”@style/Widget.MaterialComponents.Button.OutlinedButton.Icon” app:icon=”@drawable/ic_add_24px” app:iconSize=”24dp” app:iconGravity=”textStart” android:padding=”0dp” app:iconPadding=”0dp” android:insetLeft=”0dp” android:insetTop=”0dp” android:insetRight=”0dp” android:insetBottom=”0dp” app:shapeAppearanceOverlay=”@style/ShapeAppearanceOverlay.MyApp.Button.Circle” /> with: <style name=”ShapeAppearanceOverlay.MyApp.Button.Circle” parent=””> <item name=”cornerFamily”>rounded</item> <item name=”cornerSize”>50%</item> </style> or with the style=”@style/Widget.MaterialComponents.Button.Icon” It requires at least the version 1.1.0. With jetpack compose … Read more

Change Chip Widget style programmatically not working – Android

You can’t use the constructor val chip = Chip(context, null, R.style.CustomChipChoice) because the 3rd parameter isn’t the style but the attribute in the theme as R.attr.chipStyle. The Chip hasn’t a constructor with 4 parameters as other components because it extends AppCompatCheckbox which does not support a 4 parameter constructor. However you can use something different. … Read more