1
0
Fork 0
mirror of https://github.com/KokaKiwi/BarInsta synced 2026-03-04 11:31:35 +00:00

Add AMOLED dark theme

This commit is contained in:
Ammar Githam 2020-08-10 16:33:19 +09:00
parent f10fe0840b
commit c1b113e275
17 changed files with 107 additions and 45 deletions

View file

@ -42,7 +42,9 @@
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:background="@null"
app:elevation="0dp">
<com.google.android.material.appbar.CollapsingToolbarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"

View file

@ -98,6 +98,31 @@
android:paddingBottom="4dp" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginLeft="5dp"
android:background="?android:selectableItemBackground"
android:orientation="horizontal"
android:padding="5dp">
<androidx.appcompat.widget.AppCompatCheckBox
android:id="@+id/cbAmoledTheme"
android:layout_width="30dp"
android:layout_height="30dp"
android:contentDescription="@string/use_amoled_dark_theme" />
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:padding="5dp"
android:text="@string/use_amoled_dark_theme"
android:textColor="?android:textColorPrimary"
android:textSize="16sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"

View file

@ -11,7 +11,9 @@
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:background="@null"
app:elevation="0dp">
<com.google.android.material.appbar.CollapsingToolbarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"

View file

@ -8,6 +8,7 @@
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appBarLayout"
android:background="@null"
android:layout_width="match_parent"
android:layout_height="wrap_content">
@ -15,7 +16,7 @@
<com.google.android.material.appbar.CollapsingToolbarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_scrollFlags="scroll|exitUntilCollapsed">
app:layout_scrollFlags="noScroll">
<RelativeLayout
android:id="@+id/infoContainer"

View file

@ -31,4 +31,7 @@
<color name="feed_text_primary_color">@color/text_color_light</color>
<color name="dm_profile_button_color">#efefef</color>
<!-- Amoled Colors -->
<color name="background_amoled">#000000</color>
</resources>

View file

@ -211,4 +211,5 @@
<string name="updated">Thank you for updating InstaGrabber!</string>
<string name="crash_title">App crashed</string>
<string name="crash_descr">Oops.. the app crashed, but don\'t worry you can send error report to the developer to help him fix the issue. (:</string>
<string name="use_amoled_dark_theme">Use AMOLED mode for Dark theme</string>
</resources>

View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.Amoled" parent="Theme.AppCompat.NoActionBar">
<item name="android:colorBackground">@color/background_amoled</item>
<item name="bottomSheetDialogTheme">@style/AppTheme.BottomSheetDialog.Dark</item>
<item name="android:windowAnimationStyle">@style/AppTheme.WindowAnimationTransition</item>
</style>
<style name="AppTheme.BottomSheetDialog.Dark" parent="Theme.MaterialComponents.BottomSheetDialog"/>
</resources>