Category : material-components-android

I want to change the color of the outline box of text input layout in a not focused state.For that I use <color name="mtrl_textinput_default_box_stroke_color" tools:override="true">#000</color> in color.xml but I got this error C:UsersMASTERAndroidStudioProjectsCargooAppappsrcmainresvaluescolors.xml:11:81: Error: The prefix "tools" for attribute "tools:override" associated with an element type "color" is not bound.Anyone Please help Source: Android..

Read more

In styles.xml, I have replace <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> with <style name="AppTheme" parent="Theme.MaterialComponents.Light.DarkActionBar"> but now all my buttons have the same background color, even if I have already defined a background color, like <Button android:id="@+id/target" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="20dp" android:background="@drawable/button_red" android:text="@string/target" /> This is the content of my @drawable/button_red: <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" android:padding="10dp"> <solid android:color="#D11817"/> <corners android:radius="30dp"/> ..

Read more

I have editText in my layout <EditText android:id="@+id/etMarks1" style="@style/Marks"/> and theme.xml <style name="Marks" parent="Theme.MaterialComponents.DayNight.DarkActionBar"> <item name="android:layout_weight">15</item> <item name="android:ems">1</item> <item name="android:layout_width">wrap_content</item> <item name="android:layout_height">wrap_content</item> <item name="android:inputType">number</item> <item name="android:textSize">18sp</item> <item name="android:gravity">center</item> </style> The tint line color is black by default and it is changing to white in night mode when I tested in Samsung and Pixel devices (Android ..

Read more

So I would like to create something similar to AirBnB’s calendar on Android. Unfortunately there doesn’t seem to be a plugin like iOS has for this. I know there is a Mobile date range picker as part of Material Design. Which does basically everything that I require it to do, but want to build it ..

Read more

I want to change the format of Material Date Picker. I am getting it from String its like 13 Apr 2021.But I want to change in 2021-04-13 format. Calendar calendar=Calendar.getInstance(TimeZone.getTimeZone("UTC")); calendar.clear(); Long today= MaterialDatePicker.todayInUtcMilliseconds(); //materialDatePicker MaterialDatePicker.Builder start_builder=MaterialDatePicker.Builder.datePicker(); start_builder.setTitleText("SELECT A START DATE"); start_builder.setSelection(today); start_DatePicker=start_builder.build(); start_date.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { start_DatePicker.show(getSupportFragmentManager(),"Date_Picker"); } }); ..

Read more