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..
Category : material-components-android

I’m trying to create a button with the following look in android studio. The theme I use is Theme.MaterialComponents.Light.NoActionBar and I understood (maybe not correctly) that the default theme to use now days is "Material". From what I see, it is not possible to create the border from the button properties itself. I found the ..

I’m trying to make a survey app learning a bit about the FragmentContainerView and navigation graph. Everything works perfect when I use existing widgets such as radiobuttons or checkboxes for the answers. The problem arises when I try to make my own widget or change the behavior of a normal button so that it behaves ..
I’m currently writing my first Android application. so far, I’ve added the basic layout as well as a floating action button. To disable the button, I am using FloatingActionButton#setEnabled(false). However, I don’t like that there’s no visual indication whether the button is disabled. I think it would be nice for the user to actually know ..
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"/> ..
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 ..

I want to make a date of birth date picker using the material date picker component. My main target is when the user presses the edit text view, it will show the date picker dialog. Then the user selects a date and will replace it with the selected date in the edit text view. I’m ..
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 ..
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"); } }); ..
Almost all applications nowadays I see use bottom navigation bar instead of the side menu. Is this the new design way? What if my menu has a lot of items what shall I do with them? Google play store example Source: Android..
Recent Comments