Skip to content

Instantly share code, notes, and snippets.

@saurabharora90
Last active February 17, 2018 17:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saurabharora90/ee69b7d78ed598f4b887701b08c4c759 to your computer and use it in GitHub Desktop.
Save saurabharora90/ee69b7d78ed598f4b887701b08c4c759 to your computer and use it in GitHub Desktop.
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