Issue When you select two date in the range picker the in-between dates get highlighted. How do i change the color of the in-between dates? Solution You can define a style as: <style name=”MaterialCalendarTheme_RangeFill” parent=”ThemeOverlay.MaterialComponents.MaterialCalendar”> <item name=”materialCalendarStyle”>@style/MyMaterialCalendar</item> </style> <style name=”MyMaterialCalendar”
Continue readingTag: material-components
How count the number of days selected in the daterangepicker materialdesign?
Issue Hello guys I have a DatePickerRange with material design and everything is working perfectly CalendarConstraints.Builder constraitBuilder = new CalendarConstraints.Builder(); constraitBuilder.setStart(mesPresente); constraitBuilder.setEnd(limitDate); // selectedPair = new Pair<>(today,); Selecionar da por default in DateRangePicker //Date Range Picker MaterialDatePicker.Builder<Pair<Long, Long>> builder =
Continue readingEnable/Disable button when TextField has input inside a BottomSheet
Issue I want to have a simple TextField and a TextButton inside a BottomSheet. The TextButton should only be enabled if there is some text in the TextField. However it only enables/disables the button when I click the screen or
Continue readingHow do I use M3 dynamic colors in my app's launcher icon?
Issue I want to use M3 colors like ?attr/colorPrimary in my app’s launcher icon. I know this is possible because my phone’s Settings app does it. I’ve looked around quite a bit and couldn’t find anything related to this. I’ve
Continue readingChange the TextInputLayout outline box color programmatically
Issue I would like to change outline of the TextInputLayout programmatically, but I cannot seem to get it to work. There is an option to do it via XML (question by other SO user using XML), but that is unusable
Continue readingDisable tooltipText in BottomNavigationView
Issue Im using implementation ‘com.google.android.material:material:1.1.0-alpha09’ this is my menu <item android:id=”@+id/llHome” android:icon=”@drawable/selector_menu_home” android:title=”@string/navigation.bottom.home” app:tooltipText=”@null” /> but as much as I write long click or disable it, the tooltip with the name of the menu continues to appear. Any idea how
Continue readingTwo thumbs with the slider of Material component for android?
Issue on the sliders presentation of the Material.io website they show the double thumbs slider below, but I can’t find how to enable it, and I didnt really find any docs. Is it available for the android component? Solution You
Continue readingHow to make ClickableSpan links in MaterialAlertDialogBuilder clickable?
Issue I have a SpannableStringBuilder object with a ClickableSpan link like this, SpannableStringBuilder ssb = new SpannableStringBuilder(“Hi StackOverflow!”); ClickableSpan clickableSpan = new ClickableSpan() { @Override public void onClick(@NonNull View widget) { Toast.makeText(MainActivity.this, “Clicked”, Toast.LENGTH_SHORT).show(); } }; ssb.setSpan(clickableSpan, 3, 16, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
Continue readingAndroid Chip Custom Height Or Padding – Chipgroup spacing
Issue Is there a way to change default material Chip vertical padding or height? From the docs I see there surely is a way to set the minimal height, but I would like to make chips “thinner”, like in this
Continue readingandroid chips taking extra spaces;unable to wrap
Issue I use chipgroup with dynamic chips. I want the chips to get wrapped in width according to their text. But it takes extra spaces even without padding. Below is my code: xml: <com.google.android.material.chip.ChipGroup android:id=”@+id/cg” android:layout_width=”0dp” android:layout_weight=”75″ android:layout_height=”wrap_content” android:layout_marginTop=”20dp” android:layout_marginBottom=”5dp”
Continue reading