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:
parent
f2a06eab37
commit
9b40d10352
@ -1,16 +1,16 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<ripple
|
<ripple
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:color="@color/colorAccentDark"
|
android:color="@color/md_blue_grey_900"
|
||||||
>
|
>
|
||||||
<item>
|
<item>
|
||||||
<selector>
|
<selector>
|
||||||
<item android:state_selected="true">
|
<item android:state_selected="true">
|
||||||
<color android:color="@color/selectorColorDark"/>
|
<color android:color="@color/md_blue_grey_800"/>
|
||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item android:state_activated="true">
|
<item android:state_activated="true">
|
||||||
<color android:color="@color/selectorColorDark"/>
|
<color android:color="@color/md_blue_grey_800"/>
|
||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
|
@ -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>
|
|
@ -2,9 +2,9 @@
|
|||||||
<selector android:exitFadeDuration="@android:integer/config_longAnimTime"
|
<selector android:exitFadeDuration="@android:integer/config_longAnimTime"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
<item android:state_focused="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/selectorColorDark"/>
|
<item android:state_pressed="true" android:drawable="@color/md_blue_grey_800"/>
|
||||||
<item android:state_activated="true" android:drawable="@color/selectorColorDark"/>
|
<item android:state_activated="true" android:drawable="@color/md_blue_grey_900"/>
|
||||||
<item android:drawable="@color/md_black_1000"/>
|
<item android:drawable="@color/md_black_1000"/>
|
||||||
|
|
||||||
</selector>
|
</selector>
|
@ -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>
|
|
@ -12,6 +12,7 @@
|
|||||||
android:padding="8dp">
|
android:padding="8dp">
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
|
style="@style/Theme.Widget.Button.Colored"
|
||||||
android:id="@+id/search_btn"
|
android:id="@+id/search_btn"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -19,6 +20,7 @@
|
|||||||
android:text="@string/action_search"/>
|
android:text="@string/action_search"/>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
|
style="@style/Theme.Widget.Button.Borderless"
|
||||||
android:id="@+id/reset_btn"
|
android:id="@+id/reset_btn"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -29,6 +31,6 @@
|
|||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"/>
|
android:layout_height="match_parent" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
@ -43,26 +43,22 @@
|
|||||||
app:layout_constraintRight_toLeftOf="@+id/source_latest"
|
app:layout_constraintRight_toLeftOf="@+id/source_latest"
|
||||||
tools:text="Source title"/>
|
tools:text="Source title"/>
|
||||||
|
|
||||||
<TextView
|
<Button
|
||||||
android:id="@+id/source_latest"
|
android:id="@+id/source_latest"
|
||||||
style="@style/TextAppearance.Medium.Button"
|
style="@style/Theme.Widget.Button.Borderless.Small"
|
||||||
android:background="@drawable/list_item_selector_trans"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/latest"
|
android:text="@string/latest"
|
||||||
android:padding="@dimen/material_component_dialogs_padding_around_buttons"
|
|
||||||
app:layout_constraintRight_toLeftOf="@+id/source_browse"
|
app:layout_constraintRight_toLeftOf="@+id/source_browse"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"/>
|
app:layout_constraintTop_toTopOf="parent"/>
|
||||||
|
|
||||||
<TextView
|
<Button
|
||||||
android:id="@+id/source_browse"
|
android:id="@+id/source_browse"
|
||||||
style="@style/TextAppearance.Medium.Button"
|
style="@style/Theme.Widget.Button.Borderless.Small"
|
||||||
android:background="@drawable/list_item_selector_trans"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/browse"
|
android:text="@string/browse"
|
||||||
android:padding="@dimen/material_component_dialogs_padding_around_buttons"
|
|
||||||
app:layout_constraintRight_toRightOf="parent"
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"/>
|
app:layout_constraintTop_toTopOf="parent"/>
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/colorPrimary"
|
android:background="?colorPrimaryDark"
|
||||||
android:scaleType="centerCrop"/>
|
android:scaleType="centerCrop"/>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:padding="@dimen/material_component_cards_primary_title_top_padding">
|
android:padding="16dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/manga_title"
|
android:id="@+id/manga_title"
|
||||||
@ -50,30 +50,23 @@
|
|||||||
android:textAppearance="@style/TextAppearance.Medium.Body2.Hint" />
|
android:textAppearance="@style/TextAppearance.Medium.Body2.Hint" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<TextView
|
<Button
|
||||||
|
style="@style/Theme.Widget.Button.Borderless.Negative"
|
||||||
android:id="@+id/remove"
|
android:id="@+id/remove"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:layout_marginLeft="8dp"
|
android:text="@string/action_remove" />
|
||||||
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" />
|
|
||||||
|
|
||||||
<TextView
|
<Button
|
||||||
|
style="@style/Theme.Widget.Button.Borderless"
|
||||||
android:id="@+id/resume"
|
android:id="@+id/resume"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:layout_toEndOf="@id/remove"
|
android:layout_toEndOf="@id/remove"
|
||||||
android:layout_toRightOf="@id/remove"
|
android:layout_toRightOf="@id/remove"
|
||||||
android:background="?attr/selectable_list_drawable"
|
android:text="@string/action_resume"/>
|
||||||
android:padding="8dp"
|
|
||||||
android:text="@string/action_resume"
|
|
||||||
android:textAppearance="@style/TextAppearance.Medium.Button" />
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</android.support.v7.widget.CardView>
|
</android.support.v7.widget.CardView>
|
@ -26,7 +26,7 @@
|
|||||||
<style name="Theme.Tachiyomi.Amoled" parent="Theme.Base.Amoled">
|
<style name="Theme.Tachiyomi.Amoled" parent="Theme.Base.Amoled">
|
||||||
<!-- Attributes specific for SDK 21 and up -->
|
<!-- Attributes specific for SDK 21 and up -->
|
||||||
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
|
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
|
||||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
<item name="android:statusBarColor">@color/md_black_1000</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<!--==============-->
|
<!--==============-->
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
<color name="appBarDark">@color/md_grey_900</color>
|
<color name="appBarDark">@color/md_grey_900</color>
|
||||||
<color name="backgroundDark">#303030</color>
|
<color name="backgroundDark">#303030</color>
|
||||||
<color name="dialogDark">@color/md_grey_800</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="selectorColorDark">@color/md_blue_A200_50</color>
|
||||||
<color name="iconColorDark">@color/md_white_1000_54</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_A400_38">#612979FF</color>
|
||||||
|
|
||||||
<color name="md_blue_grey_900">#263238</color>
|
<color name="md_blue_grey_900">#263238</color>
|
||||||
|
<color name="md_blue_grey_800">#37474F</color>
|
||||||
|
|
||||||
<color name="md_red_500">#F44336</color>
|
<color name="md_red_500">#F44336</color>
|
||||||
|
|
||||||
|
@ -131,10 +131,6 @@
|
|||||||
<item name="android:textColor">?attr/colorAccent</item>
|
<item name="android:textColor">?attr/colorAccent</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="TextAppearance.Medium.Button.Negative">
|
|
||||||
<item name="android:textColor">@color/md_red_500</item>
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<!--=======-->
|
<!--=======-->
|
||||||
<!--Widgets-->
|
<!--Widgets-->
|
||||||
<!--=======-->
|
<!--=======-->
|
||||||
@ -204,6 +200,26 @@
|
|||||||
<item name="android:background">?attr/selectable_list_drawable</item>
|
<item name="android:background">?attr/selectable_list_drawable</item>
|
||||||
</style>
|
</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-->
|
<!--OLD-->
|
||||||
<!--===-->
|
<!--===-->
|
||||||
|
@ -87,11 +87,14 @@
|
|||||||
<!--==============-->
|
<!--==============-->
|
||||||
<style name="Theme.Base.Amoled" parent="Theme.Base.Dark">
|
<style name="Theme.Base.Amoled" parent="Theme.Base.Dark">
|
||||||
<item name="android:colorBackground">@color/md_black_1000</item>
|
<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-->
|
<!-- Custom Attributes-->
|
||||||
<item name="selectable_list_drawable">@drawable/list_item_selector_amoled</item>
|
<item name="selectable_list_drawable">@drawable/list_item_selector_amoled</item>
|
||||||
<item name="selectable_library_drawable">@drawable/library_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>
|
||||||
|
|
||||||
<style name="Theme.Tachiyomi.Amoled" parent="Theme.Base.Amoled">
|
<style name="Theme.Tachiyomi.Amoled" parent="Theme.Base.Amoled">
|
||||||
|
Loading…
Reference in New Issue
Block a user