Improved AMOLED theme. Added Button style for borderless buttons. (#1009)

* Improved AMOLED theme. Added Button style for borderless buttons. Some UI improvements.

* Deleted unused drawables from app.
This commit is contained in:
Bram van de Kerkhof 2017-09-29 08:34:13 +02:00 committed by GitHub
parent f2a06eab37
commit 9b40d10352
12 changed files with 48 additions and 52 deletions

View File

@ -1,16 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple
xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/colorAccentDark"
android:color="@color/md_blue_grey_900"
>
<item>
<selector>
<item android:state_selected="true">
<color android:color="@color/selectorColorDark"/>
<color android:color="@color/md_blue_grey_800"/>
</item>
<item android:state_activated="true">
<color android:color="@color/selectorColorDark"/>
<color android:color="@color/md_blue_grey_800"/>
</item>
<item>

View File

@ -1,6 +0,0 @@
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?android:colorControlHighlight">
<item android:id="@android:id/mask">
<color android:color="@android:color/white" />
</item>
</ripple>

View File

@ -2,9 +2,9 @@
<selector android:exitFadeDuration="@android:integer/config_longAnimTime"
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_focused="true" android:drawable="@color/selectorColorDark"/>
<item android:state_pressed="true" android:drawable="@color/selectorColorDark"/>
<item android:state_activated="true" android:drawable="@color/selectorColorDark"/>
<item android:state_focused="true" android:drawable="@color/md_blue_grey_800"/>
<item android:state_pressed="true" android:drawable="@color/md_blue_grey_800"/>
<item android:state_activated="true" android:drawable="@color/md_blue_grey_900"/>
<item android:drawable="@color/md_black_1000"/>
</selector>

View File

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:exitFadeDuration="@android:integer/config_longAnimTime">
<item android:drawable="@color/rippleColorLight" android:state_focused="true"/>
<item android:drawable="@color/rippleColorLight" android:state_pressed="true"/>
<item android:drawable="@color/rippleColorLight" android:state_activated="true"/>
<item android:drawable="@android:color/transparent"/>
</selector>

View File

@ -12,6 +12,7 @@
android:padding="8dp">
<Button
style="@style/Theme.Widget.Button.Colored"
android:id="@+id/search_btn"
android:layout_width="0dp"
android:layout_height="wrap_content"
@ -19,6 +20,7 @@
android:text="@string/action_search"/>
<Button
style="@style/Theme.Widget.Button.Borderless"
android:id="@+id/reset_btn"
android:layout_width="0dp"
android:layout_height="wrap_content"
@ -29,6 +31,6 @@
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"/>
android:layout_height="match_parent" />
</LinearLayout>

View File

@ -43,26 +43,22 @@
app:layout_constraintRight_toLeftOf="@+id/source_latest"
tools:text="Source title"/>
<TextView
<Button
android:id="@+id/source_latest"
style="@style/TextAppearance.Medium.Button"
android:background="@drawable/list_item_selector_trans"
style="@style/Theme.Widget.Button.Borderless.Small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/latest"
android:padding="@dimen/material_component_dialogs_padding_around_buttons"
app:layout_constraintRight_toLeftOf="@+id/source_browse"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
<TextView
<Button
android:id="@+id/source_browse"
style="@style/TextAppearance.Medium.Button"
android:background="@drawable/list_item_selector_trans"
style="@style/Theme.Widget.Button.Borderless.Small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/browse"
android:padding="@dimen/material_component_dialogs_padding_around_buttons"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"/>

View File

@ -8,7 +8,7 @@
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorPrimary"
android:background="?colorPrimaryDark"
android:scaleType="centerCrop"/>
<ImageView

View File

@ -26,7 +26,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="@dimen/material_component_cards_primary_title_top_padding">
android:padding="16dp">
<TextView
android:id="@+id/manga_title"
@ -50,30 +50,23 @@
android:textAppearance="@style/TextAppearance.Medium.Body2.Hint" />
</RelativeLayout>
<TextView
<Button
style="@style/Theme.Widget.Button.Borderless.Negative"
android:id="@+id/remove"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginLeft="8dp"
android:layout_marginStart="8dp"
android:background="?attr/selectable_list_drawable"
android:clickable="true"
android:padding="8dp"
android:text="@string/action_remove"
android:textAppearance="@style/TextAppearance.Medium.Button.Negative" />
android:text="@string/action_remove" />
<TextView
<Button
style="@style/Theme.Widget.Button.Borderless"
android:id="@+id/resume"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_toEndOf="@id/remove"
android:layout_toRightOf="@id/remove"
android:background="?attr/selectable_list_drawable"
android:padding="8dp"
android:text="@string/action_resume"
android:textAppearance="@style/TextAppearance.Medium.Button" />
android:text="@string/action_resume"/>
</RelativeLayout>
</LinearLayout>
</android.support.v7.widget.CardView>

View File

@ -26,7 +26,7 @@
<style name="Theme.Tachiyomi.Amoled" parent="Theme.Base.Amoled">
<!-- Attributes specific for SDK 21 and up -->
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:statusBarColor">@color/md_black_1000</item>
</style>
<!--==============-->

View File

@ -34,6 +34,7 @@
<color name="appBarDark">@color/md_grey_900</color>
<color name="backgroundDark">#303030</color>
<color name="dialogDark">@color/md_grey_800</color>
<color name="dialog_oled">#141414</color>
<color name="selectorColorDark">@color/md_blue_A200_50</color>
<color name="iconColorDark">@color/md_white_1000_54</color>
@ -73,6 +74,7 @@
<color name="md_blue_A400_38">#612979FF</color>
<color name="md_blue_grey_900">#263238</color>
<color name="md_blue_grey_800">#37474F</color>
<color name="md_red_500">#F44336</color>

View File

@ -131,10 +131,6 @@
<item name="android:textColor">?attr/colorAccent</item>
</style>
<style name="TextAppearance.Medium.Button.Negative">
<item name="android:textColor">@color/md_red_500</item>
</style>
<!--=======-->
<!--Widgets-->
<!--=======-->
@ -204,6 +200,26 @@
<item name="android:background">?attr/selectable_list_drawable</item>
</style>
<!--==============-->
<!--Widgets.Button-->
<!--==============-->
<style name="Theme.Widget.Button" parent="Widget.AppCompat.Button"/>
<style name="Theme.Widget.Button.Colored" parent="Widget.AppCompat.Button.Colored"/>
<style name="Theme.Widget.Button.Borderless" parent="Widget.AppCompat.Button.Borderless">
<item name="android:textColor">?attr/colorAccent</item>
</style>
<style name="Theme.Widget.Button.Borderless.Negative">
<item name="android:textColor">@color/md_red_500</item>
</style>
<style name="Theme.Widget.Button.Borderless.Small">
<item name="android:minHeight">48dip</item>
<item name="android:minWidth">48dip</item>
</style>
<!--===-->
<!--OLD-->
<!--===-->

View File

@ -87,11 +87,14 @@
<!--==============-->
<style name="Theme.Base.Amoled" parent="Theme.Base.Dark">
<item name="android:colorBackground">@color/md_black_1000</item>
<item name="colorPrimary">@color/appBarDark</item>
<item name="colorPrimaryDark">@color/md_blue_grey_900</item>
<item name="colorAccent">@color/md_grey_800</item>
<!-- Custom Attributes-->
<item name="selectable_list_drawable">@drawable/list_item_selector_amoled</item>
<item name="selectable_library_drawable">@drawable/library_item_selector_amoled</item>
<item name="background_card">@color/md_black_1000</item>
<item name="background_card">@color/dialog_oled</item>
</style>
<style name="Theme.Tachiyomi.Amoled" parent="Theme.Base.Amoled">