Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Primer on Styles and Themes - Seekbar theme
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/randomRed</item>
</style>
<style name="SeekbarChangeTrack">
<item name="colorControlActivated">@color/green</item>
</style>
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme">
</activity>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="16dp">
<SeekBar
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/SeekbarChangeTrack"/>
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:checked="true"/>
</LinearLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment