-
-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Guide for how to create themes #63
base: mk_pre
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Make an image with ticks. Put it in the drawable folder named |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Make a preview image showing the needle and the dial named |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Make an image showing the needle named as |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,7 @@ | |
<item>Dark</item> | ||
<item>Mustang GT</item> | ||
<item>BMW</item> | ||
<item>MK</item> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Put the name of the theme in the |
||
<item>Test</item> | ||
</string-array> | ||
|
||
|
@@ -46,6 +47,7 @@ | |
<item>@drawable/ic_theme_dark</item> | ||
<item>@drawable/ic_theme_ford</item> | ||
<item>@drawable/ic_theme_bmw</item> | ||
<item>@drawable/ic_theme_mk</item> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Put a reference to the preview image in the |
||
<item>@drawable/ic_theme_test</item> | ||
</array> | ||
|
||
|
@@ -70,6 +72,7 @@ | |
<item>@style/AppTheme.Dark</item> | ||
<item>@style/AppTheme.Ford</item> | ||
<item>@style/AppTheme.BMW</item> | ||
<item>@style/AppTheme.MK</item> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add an item to the |
||
<item>@style/AppTheme.Testing</item> | ||
</array> | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -345,6 +345,21 @@ | |
<item name="sv_tickRotation">false</item> | ||
</style> | ||
|
||
<style name="AppTheme.MK" parent="AppTheme"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Create a new XML element in this file to declare your new theme. The item in |
||
<item name="themedDialBackground">@drawable/dial_background_blank_mk</item> | ||
<item name="themedEmptyDialBackground">@drawable/dial_background_marks_mk</item> | ||
<item name="themedBlankDialBackground">@drawable/dial_background_marks_mk</item> | ||
Comment on lines
+349
to
+351
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Set these to reference your images. |
||
<item name="themedNeedle">@drawable/needle_mk</item> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Set to reference the needle image. |
||
<item name="themedStopWatchBackground">@drawable/dial_background_blank_mk</item> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This may be used in the future if we add the stopwatch feature back. |
||
<item name="themedNeedleColor">@color/red</item> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Controls the color of the min/max triangle. |
||
<item name="sv_withIndicatorLight">false</item> | ||
<item name="sv_indicatorLightColor">#44FFFFFF</item> | ||
Comment on lines
+355
to
+356
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These can be used to control the blur effect when the dial is moving. It shows a light in the wake of the needle. |
||
<item name="sv_indicatorColor">@color/aqua</item> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This must be set to |
||
<item name="sv_indicatorWidth">0dp</item> | ||
<item name="sv_tickPadding">30dp</item> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can set positive and negative padding to control how far inside or outside the ticks show. Positive padding is inside. |
||
<item name="sv_tickRotation">false</item> | ||
</style> | ||
|
||
<style name="AppTheme.Testing" parent="AppTheme"> | ||
<item name="themedCarBackground">@drawable/background_incar_test</item> | ||
<item name="themedDialBackground">@drawable/dial_background_test</item> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make an image without ticks. Put it in the drawable folder named
dial_background_blank_<your theme name>.png