You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<?xml version="1.0" encoding="utf-8"?><!-- Copyright 2024 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.-->
<ScrollViewxmlns:android="http://schemas.android.com/apk/res/android"xmlns:app="http://schemas.android.com/apk/res-auto"android:layout_width="match_parent"android:layout_height="match_parent">
<LinearLayoutandroid:layout_width="match_parent"android:layout_height="wrap_content"android:paddingTop="16dp"android:paddingLeft="16dp"android:paddingRight="16dp"android:orientation="vertical">
<com.google.android.material.slider.Slider
android:id="@+id/slider_icon_start"android:layout_width="match_parent"android:layout_height="wrap_content"android:layout_marginTop="32dp"android:layout_gravity="center"android:value="8.00"android:valueFrom="0.0"android:valueTo="11.0"app:thumbHeight="48dp"app:trackCornerSize="12dp"app:trackHeight="40dp"app:trackIconActiveColor="@color/yellow_500"app:trackIconActiveStart="@drawable/baseline_music_note_24"app:trackIconInactiveColor="@color/m3_ref_palette_green50"app:trackIconInactiveStart="@drawable/baseline_music_off_24"app:trackIconSize="20dp" />
<com.google.android.material.slider.Slider
android:id="@+id/slider_icon_end"android:layout_width="match_parent"android:layout_height="wrap_content"android:layout_marginTop="32dp"android:layout_gravity="center"android:value="8.00"android:valueFrom="0.0"android:valueTo="11.0"app:thumbHeight="48dp"app:trackCornerSize="12dp"app:trackHeight="40dp"app:trackIconActiveColor="@color/m3_ref_palette_orange70"app:trackIconActiveEnd="@drawable/baseline_music_note_24"app:trackIconInactiveColor="@color/blue_700"app:trackIconInactiveEnd="@drawable/baseline_music_off_24"app:trackIconSize="20dp"app:trackStopIndicatorSize="0dp" />
<com.google.android.material.slider.Slider
android:id="@+id/slider_icon_start_end"android:layout_width="match_parent"android:layout_height="wrap_content"android:layout_marginTop="32dp"android:layout_gravity="center"android:value="8.00"android:valueFrom="0.0"android:valueTo="11.0"app:thumbHeight="48dp"app:trackCornerSize="12dp"app:trackHeight="40dp"app:trackIconActiveColor="@color/red_500"app:trackIconActiveEnd="@drawable/baseline_music_note_24"app:trackIconActiveStart="@drawable/avd_clock_alarm"app:trackIconInactiveColor="@color/m3_ref_palette_purple40"app:trackIconInactiveEnd="@drawable/baseline_music_off_24"app:trackIconInactiveStart="@drawable/avd_clock_clock"app:trackIconSize="20dp"app:trackStopIndicatorSize="0dp" />
</LinearLayout>
</ScrollView>
Result:
31-84.mp4
Material Library version: 1.13.0-alpha09
Device: API 28 Emulator
The text was updated successfully, but these errors were encountered:
Source code:
cat_slider_demo_icon.xml
Result:
31-84.mp4
Material Library version: 1.13.0-alpha09
Device: API 28 Emulator
The text was updated successfully, but these errors were encountered: