Add colors in About page

This commit is contained in:
h4h13 2020-04-27 00:38:15 +05:30
parent ad6eec2240
commit 0bff6d1f3a
8 changed files with 103 additions and 35 deletions

View file

@ -1 +1,69 @@
<html> <head> <style type="text/css"> * { word-wrap: break-word; } {style-placeholder} a { color: {link-color}; } a:active { color: {link-color-active}; } ol { list-style-position: inside; padding-left: 0; padding-right: 0; } li { padding-top: 8px; } </style> </head> <body> <h4>v3.5.010</h4> <ul> <li>Added grid size and layout change for songs list</li> <li>Removed menu options (No use of having only settings)</li> <li>Added settings option to toolbar</li> <li>Updated internal library</li> </ul> <h4>v3.4.970</h4> <ul> <li>Added default cover with accent color</li> <li>Added date modified option to sort songs</li> <li>Added toggle bluetooth connection to play on device as soon as it connected</li> <li>Major code refactor for library tabs</li> <li>Folder option now in available in tabs</li> <li>Improved drive mode page</li> <li>Improved fit, full, card themes for status visibility</li> <li>Fix tablet version of app</li> <li>Fix Album and Artist details toolbar full width for better accessibility</li> <li>Updated internal libraries</li> </ul> <h4>v3.4.900</h4> <ul> <li>Added playlist search</li> <li>Added Drive mode</li> <li>Added Album and Artist layout change option in library</li> <li>Added Show more album and artist information in details</li> <li>Added Pixel style scroller bar</li> <li>Added current now playing share</li> <li>Fix font issues and colors in some places</li> <li>Improved Full now playing theme</li> </ul> <p>If you see entire app white or dark or black select same theme in settings to fix </p> <p style="line-height:150%"><a href="https://github.com/h4h13/RetroMusicPlayer/wiki/FAQ">FAQ's</a> </p> <p style="line-height:150%">*If you face any UI related issues you clear app data and cache, if its not working try to uninstall and install again. </p> </body> <html>
<head>
<style type="text/css">
* {
word-wrap: break-word;
}
body {
padding-left: 1rem;
padding-right: 1rem;
}
h2{
margin-block-end: 0rem;
margin-block-start: 0rem;
}
li {
font-size: 0.85rem;
padding-top: 0.5rem;
padding-left: 0;
padding-right: 0;
color: rgba(0,0,0,0.8);
}
ul {
padding-left: 1.5rem;
margin-top: 0rem;
margin-bottom: 0rem;
}
p {
font-size: 0.8rem;
}
span {
font-size: 0.7rem;
line-height: 0.7rem;
}
{style-placeholder}
</style>
</head>
<body>
<h2>v3.5.100</h2>
<font color="green"><span>Internal version</span></font>
<h3>What's new?</h3>
<ul>
<li>Added grid size and layout change for songs list</li>
<li>Removed menu options (No use of having only settings)</li>
<li>Added settings option to toolbar</li>
</ul>
<h3>Improvements and fixed issues</h3>
<ul>
<li>Added default cover with accent color</li>
<li>Added date modified option to sort songs</li>
<li>Added toggle bluetooth connection to play on device as soon as it connected</li>
<li>Major code refactor for library tabs</li>
<li>Folder option now in available in tabs</li>
<li>Improved drive mode page</li>
<li>Improved fit, full, card themes for status visibility</li>
<li>Fix tablet version of app</li>
<li>Fix Album and Artist details toolbar full width for better accessibility</li>
<li>Updated internal libraries</li>
</ul>
<p>*If you face any UI related issues you clear app data and cache, if itsnot working try to uninstall and install
again. </p>
</body>

View file

@ -19,6 +19,7 @@ import java.io.BufferedReader;
import java.io.InputStream; import java.io.InputStream;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.util.Locale;
import code.name.monkey.appthemehelper.ThemeStore; import code.name.monkey.appthemehelper.ThemeStore;
import code.name.monkey.appthemehelper.util.ATHUtil; import code.name.monkey.appthemehelper.util.ATHUtil;
@ -37,8 +38,8 @@ public class WhatsNewActivity extends AbsBaseActivity {
WebView webView; WebView webView;
private static String colorToCSS(int color) { private static String colorToCSS(int color) {
return String.format("rgb(%d, %d, %d)", Color.red(color), Color.green(color), return String.format(Locale.getDefault(),"rgba(%d, %d, %d, %d)", Color.red(color), Color.green(color),
Color.blue(color)); // on API 29, WebView doesn't load with hex colors Color.blue(color), Color.alpha(color)); // on API 29, WebView doesn't load with hex colors
} }
private static void setChangelogRead(@NonNull Context context) { private static void setChangelogRead(@NonNull Context context) {
@ -83,16 +84,13 @@ public class WhatsNewActivity extends AbsBaseActivity {
// Inject color values for WebView body background and links // Inject color values for WebView body background and links
final boolean isDark = ATHUtil.INSTANCE.isWindowBackgroundDark(this); final boolean isDark = ATHUtil.INSTANCE.isWindowBackgroundDark(this);
final String backgroundColor = colorToCSS(ATHUtil.INSTANCE.resolveColor(this, R.attr.colorSurface, final String backgroundColor = colorToCSS(ATHUtil.INSTANCE.resolveColor(this, R.attr.colorSurface, Color.parseColor(isDark ? "#424242" : "#ffffff")));
Color.parseColor(isDark ? "#424242" : "#ffffff")));
final String contentColor = colorToCSS(Color.parseColor(isDark ? "#ffffff" : "#000000")); final String contentColor = colorToCSS(Color.parseColor(isDark ? "#ffffff" : "#000000"));
final String textColor = colorToCSS(Color.parseColor(isDark ? "#60FFFFFF" : "#80000000"));
final String changeLog = buf.toString() final String changeLog = buf.toString()
.replace("{style-placeholder}", .replace("{style-placeholder}", String.format("body { background-color: %s; color: %s; } li {color: %s;}", backgroundColor, contentColor, textColor))
String.format("body { background-color: %s; color: %s; }", backgroundColor, contentColor))
.replace("{link-color}", colorToCSS(ThemeStore.Companion.accentColor(this))) .replace("{link-color}", colorToCSS(ThemeStore.Companion.accentColor(this)))
.replace("{link-color-active}", .replace("{link-color-active}", colorToCSS(ColorUtil.INSTANCE.lightenColor(ThemeStore.Companion.accentColor(this))));
colorToCSS(ColorUtil.INSTANCE.lightenColor(ThemeStore.Companion.accentColor(this))));
webView.loadData(changeLog, "text/html", "UTF-8"); webView.loadData(changeLog, "text/html", "UTF-8");
} catch (Throwable e) { } catch (Throwable e) {
webView.loadData("<h1>Unable to load</h1><p>" + e.getLocalizedMessage() + "</p>", "text/html", "UTF-8"); webView.loadData("<h1>Unable to load</h1><p>" + e.getLocalizedMessage() + "</p>", "text/html", "UTF-8");

View file

@ -3,7 +3,8 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:cardCornerRadius="8dp" app:cardBackgroundColor="@color/md_blue_100"
app:cardCornerRadius="@dimen/about_card_radius"
app:cardUseCompatPadding="true"> app:cardUseCompatPadding="true">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
@ -11,7 +12,8 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"> android:orientation="vertical">
<code.name.monkey.appthemehelper.common.views.ATEAccentTextView
<com.google.android.material.textview.MaterialTextView
android:id="@+id/sb1" android:id="@+id/sb1"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -21,7 +23,7 @@
android:paddingBottom="?attr/listPreferredItemPaddingEnd" android:paddingBottom="?attr/listPreferredItemPaddingEnd"
android:text="@string/credit_title" android:text="@string/credit_title"
android:textAppearance="@style/TextViewOverline" android:textAppearance="@style/TextViewOverline"
android:textColor="?colorAccent" android:textColor="?android:attr/textColorSecondary"
app:layout_constrainedWidth="true" app:layout_constrainedWidth="true"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0" app:layout_constraintHorizontal_bias="0"

View file

@ -3,7 +3,8 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:cardCornerRadius="8dp" app:cardBackgroundColor="@color/md_purple_100"
app:cardCornerRadius="@dimen/about_card_radius"
app:cardUseCompatPadding="true"> app:cardUseCompatPadding="true">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
@ -11,7 +12,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"> android:orientation="vertical">
<code.name.monkey.appthemehelper.common.views.ATEAccentTextView <com.google.android.material.textview.MaterialTextView
android:id="@+id/sb4" android:id="@+id/sb4"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -21,7 +22,7 @@
android:paddingBottom="?attr/listPreferredItemPaddingEnd" android:paddingBottom="?attr/listPreferredItemPaddingEnd"
android:text="@string/others" android:text="@string/others"
android:textAppearance="@style/TextViewOverline" android:textAppearance="@style/TextViewOverline"
android:textColor="?colorAccent" android:textColor="?android:attr/textColorSecondary"
app:layout_constrainedWidth="true" app:layout_constrainedWidth="true"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0" app:layout_constraintHorizontal_bias="0"

View file

@ -3,16 +3,17 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:cardBackgroundColor="?colorSurface" app:cardBackgroundColor="@color/md_light_green_100"
app:cardCornerRadius="8dp" app:cardCornerRadius="@dimen/about_card_radius"
app:cardUseCompatPadding="true"> app:cardUseCompatPadding="true">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<code.name.monkey.appthemehelper.common.views.ATEAccentTextView
<com.google.android.material.textview.MaterialTextView
android:id="@+id/sb2" android:id="@+id/sb2"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -22,7 +23,7 @@
android:paddingBottom="?attr/listPreferredItemPaddingEnd" android:paddingBottom="?attr/listPreferredItemPaddingEnd"
android:text="@string/support_development" android:text="@string/support_development"
android:textAppearance="@style/TextViewOverline" android:textAppearance="@style/TextViewOverline"
android:textColor="?colorAccent" android:textColor="?android:attr/textColorSecondary"
app:layout_constrainedWidth="true" app:layout_constrainedWidth="true"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0" app:layout_constraintHorizontal_bias="0"

View file

@ -3,7 +3,8 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:cardCornerRadius="8dp" app:cardBackgroundColor="@color/md_indigo_100"
app:cardCornerRadius="@dimen/about_card_radius"
app:cardUseCompatPadding="true"> app:cardUseCompatPadding="true">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
@ -11,7 +12,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"> android:orientation="vertical">
<code.name.monkey.appthemehelper.common.views.ATEAccentTextView <com.google.android.material.textview.MaterialTextView
android:id="@+id/sb3" android:id="@+id/sb3"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -21,7 +22,7 @@
android:paddingBottom="?attr/listPreferredItemPaddingEnd" android:paddingBottom="?attr/listPreferredItemPaddingEnd"
android:text="@string/social" android:text="@string/social"
android:textAppearance="@style/TextViewOverline" android:textAppearance="@style/TextViewOverline"
android:textColor="?colorAccent" android:textColor="?android:attr/textColorSecondary"
app:layout_constrainedWidth="true" app:layout_constrainedWidth="true"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0" app:layout_constraintHorizontal_bias="0"

View file

@ -54,4 +54,5 @@
<dimen name="slider_track_height">3dp</dimen> <dimen name="slider_track_height">3dp</dimen>
<dimen name="adaptive_icon_size">48dp</dimen> <dimen name="adaptive_icon_size">48dp</dimen>
<dimen name="adaptive_icon_padding">12dp</dimen> <dimen name="adaptive_icon_padding">12dp</dimen>
<dimen name="about_card_radius">16dp</dimen>
</resources> </resources>

View file

@ -7,15 +7,10 @@
<color name="md_red_500">#F44336</color> <color name="md_red_500">#F44336</color>
<color name="md_red_A400">#FF1744</color> <color name="md_red_A400">#FF1744</color>
<!-- Pink -->
<!-- Yellow -->
<color name="md_yellow_A400">#FFD600</color> <color name="md_yellow_A400">#FFD600</color>
<!-- Deep Purple -->
<color name="md_deep_purple_A400">#651FFF</color> <color name="md_deep_purple_A400">#651FFF</color>
<color name="md_deep_purple_300">#9575CD</color> <color name="md_deep_purple_300">#9575CD</color>
<color name="md_deep_purple_400">#7E57C2</color> <color name="md_deep_purple_400">#7E57C2</color>
<color name="md_deep_purple_600">#5E35B1</color> <color name="md_deep_purple_600">#5E35B1</color>
@ -24,15 +19,12 @@
<color name="md_deep_purple_500">#673AB7</color> <color name="md_deep_purple_500">#673AB7</color>
<color name="md_deep_purple_A200">#7C4DFF</color> <color name="md_deep_purple_A200">#7C4DFF</color>
<!-- Indigo -->
<color name="md_blue_100">#BBDEFB</color>
<!-- Blue -->
<color name="md_blue_500">#2196F3</color> <color name="md_blue_500">#2196F3</color>
<color name="md_blue_A200">#448AFF</color> <color name="md_blue_A200">#448AFF</color>
<color name="md_blue_A400">#2979FF</color> <color name="md_blue_A400">#2979FF</color>
<color name="md_green_A200">#69F0AE</color> <color name="md_green_A200">#69F0AE</color>
<color name="md_green_A700">#00C853</color> <color name="md_green_A700">#00C853</color>
<color name="md_green_500">#4CAF50</color> <color name="md_green_500">#4CAF50</color>
@ -44,11 +36,15 @@
<color name="md_grey_800">#424242</color> <color name="md_grey_800">#424242</color>
<color name="md_grey_900">#212121</color> <color name="md_grey_900">#212121</color>
<color name="md_black_1000">#000000</color> <color name="md_black_1000">#000000</color>
<color name="md_white_1000">#FFFFFF</color> <color name="md_white_1000">#FFFFFF</color>
<color name="md_white_semi_transparent">#40FFFFFF</color> <color name="md_white_semi_transparent">#40FFFFFF</color>
<color name="md_green_100">#C8E6C9</color>
<color name="md_light_green_100">#DCEDC8</color>
<color name="md_indigo_100">#C5CAE9</color>
<color name="md_purple_100">#E1BEE7</color>
<color name="md_deep_purple_100">#D1C4E9</color>
<color name="md_teal_A400">#1DE9B6</color> <color name="md_teal_A400">#1DE9B6</color>
<color name="md_deep_orange_A400">#FF3D00</color> <color name="md_deep_orange_A400">#FF3D00</color>