Skip to content

Commit

Permalink
Design/theme tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
premnirmal committed Feb 2, 2022
1 parent 5309eda commit 4374940
Show file tree
Hide file tree
Showing 16 changed files with 58 additions and 167 deletions.
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:theme="@style/AppTheme"
android:theme="@style/StocksWidget.App.Theme"
tools:replace="android:icon">

<activity
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout-sw600dp-land/activity_alerts.xml
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@
android:layout_marginRight="16dp"
android:layout_marginBottom="20dp"
android:text="@string/add"
style="@style/ButtonStyle"
/>

</LinearLayout>
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout/activity_alerts.xml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@

<Button
android:id="@+id/addButton"
style="@style/ButtonStyle"
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_gravity="center_horizontal"
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout/activity_positions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@
</LinearLayout>

<Button
style="@style/ButtonStyle"
android:id="@+id/addButton"
android:layout_width="match_parent"
android:layout_height="45dp"
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/res/layout/fragment_home.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
android:id="@+id/app_bar_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
android:theme="@style/ThemeOverlay.Material3.Dark.ActionBar"
>

<com.google.android.material.appbar.CollapsingToolbarLayout
Expand All @@ -32,6 +32,7 @@
android:layout_height="match_parent"
app:layout_scrollFlags="scroll|exitUntilCollapsed"
app:titleEnabled="false"
app:contentScrim="@color/home_toolbar_scrim"
>

<ImageView
Expand Down Expand Up @@ -71,6 +72,7 @@
android:layout_gravity="bottom"
android:gravity="bottom"
app:layout_collapseMode="none"
android:background="@null"
/>

<androidx.appcompat.widget.Toolbar
Expand Down
21 changes: 1 addition & 20 deletions app/src/main/res/values-night-v23/styles.xml
Original file line number Diff line number Diff line change
@@ -1,25 +1,6 @@
<resources>

<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
<item name="colorPrimary">@color/color_primary</item>
<item name="colorPrimaryDark">@color/color_primary_dark</item>
<item name="colorAccent">@color/color_accent</item>
<item name="android:colorPrimary">@color/color_primary</item>
<item name="android:colorPrimaryDark">@color/color_primary_dark</item>
<item name="android:colorAccent">@color/color_accent</item>
<item name="android:windowBackground">@color/default_bg</item>
<item name="android:textViewStyle">@style/TextViewStyle</item>
<item name="android:buttonStyle">@style/ButtonStyle</item>
<item name="android:alertDialogTheme">@style/AlertDialog</item>
<item name="android:dialogTheme">@style/AlertDialog</item>
<item name="android:actionBarStyle">@style/ActionBarStyle</item>
<item name="alertDialogTheme">@style/AlertDialog</item>

<!-- For AppCompat -->
<item name="editTextStyle">@style/EditTextStyle</item>
<item name="buttonStyle">@style/ButtonStyle</item>
<item name="preferenceTheme">@style/AppPreferenceTheme</item>

<style name="StocksWidget.App.Theme" parent="AppTheme">
<!-- v21 specific -->
<item name="android:navigationBarColor">@color/nav_bar_bg</item>
</style>
Expand Down
25 changes: 1 addition & 24 deletions app/src/main/res/values-night-v27/styles.xml
Original file line number Diff line number Diff line change
@@ -1,30 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
<item name="colorPrimary">@color/color_primary</item>
<item name="colorPrimaryDark">@color/color_primary_dark</item>
<item name="colorAccent">@color/color_accent</item>
<item name="android:colorPrimary">@color/color_primary</item>
<item name="android:colorPrimaryDark">@color/color_primary_dark</item>
<item name="android:windowBackground">@color/default_bg</item>
<item name="android:colorAccent">@color/color_accent</item>
<item name="android:colorSecondary">@color/color_accent</item>
<item name="android:alertDialogTheme">@style/AlertDialog</item>
<item name="android:dialogTheme">@style/AlertDialog</item>
<item name="android:timePickerDialogTheme">@style/AlertDialog</item>
<item name="android:datePickerDialogTheme">@style/AlertDialog</item>
<item name="android:actionBarStyle">@style/ActionBarStyle</item>
<item name="alertDialogTheme">@style/AlertDialog</item>

<item name="android:textViewStyle">@style/TextViewStyle</item>
<item name="android:buttonStyle">@style/ButtonStyle</item>

<!-- For AppCompat -->
<item name="editTextStyle">@style/EditTextStyle</item>
<item name="buttonStyle">@style/ButtonStyle</item>
<item name="preferenceTheme">@style/AppPreferenceTheme</item>

<style name="StocksWidget.App.Theme" parent="AppTheme">
<!-- v21 specific -->
<item name="android:statusBarColor">@color/transparent</item>
<item name="android:navigationBarColor">@color/nav_bar_bg</item>
Expand Down
5 changes: 2 additions & 3 deletions app/src/main/res/values-night/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<color name="color_splash">#191919</color>
<color name="graph_bg">#000000</color>
<color name="color_statusbar">@color/bg_toolbar</color>
<color name="bg_toolbar">#2f2f2f</color>
<color name="bg_toolbar">@color/color_primary</color>
<color name="divider">#aaaa</color>
<color name="card_bg">#1d1d1d</color>
<color name="card_shadow">#95000000</color>
Expand All @@ -20,7 +20,7 @@
<color name="positive_green_dark">#009900</color>
<color name="disabled_grey">#98545454</color>
<color name="unselected_grey">#ffbdbdbd</color>
<color name="nav_bar_bg">@color/bg_toolbar</color>
<color name="nav_bar_bg">#2f2f2f</color>
<color name="nav_bar_bg_2">@color/card_bg</color>
<color name="bottom_bar_bg">@color/card_bg</color>
<color name="actionbar_title_text">#ffffff</color>
Expand All @@ -31,7 +31,6 @@
<color name="text_inverse">#1b1b1b</color>
<color name="button_text">#ffffff</color>
<color name="icon_tint">#ffffff</color>
<color name="home_toolbar_scrim">@color/color_primary</color>
<color name="tab_text">@color/text_3</color>
<color name="tab_text_selected">@color/text_1</color>
<color name="snackbar_bg">@color/color_primary</color>
Expand Down
35 changes: 8 additions & 27 deletions app/src/main/res/values-v21/styles.xml
Original file line number Diff line number Diff line change
@@ -1,31 +1,12 @@
<resources xmlns:tools="http://schemas.android.com/tools">

<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
<item name="colorPrimary">@color/color_primary</item>
<item name="colorPrimaryDark">@color/color_primary_dark</item>
<item name="colorAccent">@color/color_accent</item>
<item name="android:colorPrimary">@color/color_primary</item>
<item name="android:colorPrimaryDark">@color/color_primary_dark</item>
<item name="android:colorAccent">@color/color_accent</item>
<item name="android:windowBackground">@color/default_bg</item>
<item name="android:textViewStyle">@style/TextViewStyle</item>
<item name="android:buttonStyle">@style/ButtonStyle</item>
<item name="android:alertDialogTheme">@style/AlertDialog</item>
<item name="android:dialogTheme">@style/AlertDialog</item>
<item name="android:actionBarStyle">@style/ActionBarStyle</item>
<item name="alertDialogTheme">@style/AlertDialog</item>

<!-- For AppCompat -->
<item name="editTextStyle">@style/EditTextStyle</item>
<item name="buttonStyle">@style/ButtonStyle</item>
<item name="preferenceTheme">@style/AppPreferenceTheme</item>

<style name="StocksWidget.App.Theme" parent="AppTheme">
<!-- v21 specific -->
<item name="android:statusBarColor">@color/transparent</item>
<item name="android:navigationBarColor">@color/nav_bar_bg</item>
</style>

<style name="AlertDialog" parent="@style/Theme.AppCompat.DayNight.Dialog.Alert">
<style name="AlertDialog" parent="@style/Theme.Material3.DayNight.Dialog.Alert">
<item name="android:colorPrimary">@color/color_accent</item>
<item name="android:colorAccent">@color/color_accent</item>
<item name="android:textColor">@color/color_accent</item>
Expand All @@ -40,31 +21,31 @@
<item name="colorControlActivated">@color/color_accent</item>
</style>

<style name="WidgetSettingsTheme" parent="AppTheme">
<style name="WidgetSettingsTheme" parent="StocksWidget.App.Theme">
<item name="android:statusBarColor">@color/color_statusbar</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowShowWallpaper">true</item>
</style>

<style name="SearchTheme" parent="AppTheme">
<style name="SearchTheme" parent="StocksWidget.App.Theme">
<item name="android:statusBarColor">@color/color_statusbar</item>
</style>

<style name="NewsFeedActivityTheme" parent="AppTheme">
<style name="NewsFeedActivityTheme" parent="StocksWidget.App.Theme">
<item name="android:statusBarColor">@color/color_statusbar</item>
</style>

<style name="GraphActivityTheme" parent="AppTheme">
<style name="GraphActivityTheme" parent="StocksWidget.App.Theme">
<item name="android:navigationBarColor">@android:color/transparent</item>
<item name="android:windowTranslucentNavigation">true</item>
</style>

<style name="AddPositionTheme" parent="AppTheme">
<style name="AddPositionTheme" parent="StocksWidget.App.Theme">
<item name="android:statusBarColor">@color/color_statusbar</item>
</style>

<style name="SplashTheme" parent="AppTheme">
<style name="SplashTheme" parent="StocksWidget.App.Theme">
<item name="android:windowBackground">@drawable/bg_splash</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:navigationBarColor">@android:color/transparent</item>
Expand Down
24 changes: 3 additions & 21 deletions app/src/main/res/values-v23/styles.xml
Original file line number Diff line number Diff line change
@@ -1,32 +1,14 @@
<resources xmlns:tools="http://schemas.android.com/tools">

<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
<item name="colorPrimary">@color/color_primary</item>
<item name="colorPrimaryDark">@color/color_primary_dark</item>
<item name="colorAccent">@color/color_accent</item>
<item name="android:colorPrimary">@color/color_primary</item>
<item name="android:colorPrimaryDark">@color/color_primary_dark</item>
<item name="android:colorAccent">@color/color_accent</item>
<item name="android:windowBackground">@color/default_bg</item>
<item name="android:textViewStyle">@style/TextViewStyle</item>
<item name="android:buttonStyle">@style/ButtonStyle</item>
<item name="android:alertDialogTheme">@style/AlertDialog</item>
<item name="android:dialogTheme">@style/AlertDialog</item>
<item name="android:actionBarStyle">@style/ActionBarStyle</item>
<item name="alertDialogTheme">@style/AlertDialog</item>

<!-- For AppCompat -->
<item name="editTextStyle">@style/EditTextStyle</item>
<item name="buttonStyle">@style/ButtonStyle</item>
<item name="preferenceTheme">@style/AppPreferenceTheme</item>

<style name="StocksWidget.App.Theme" parent="AppTheme">
<!-- v21 specific -->
<item name="android:statusBarColor">@color/transparent</item>
<item name="android:navigationBarColor">@color/nav_bar_bg</item>
<!-- v23 specific -->
<item name="android:windowLightStatusBar">true</item>
</style>

<style name="AlertDialog" parent="@style/Theme.AppCompat.DayNight.Dialog.Alert">
<style name="AlertDialog" parent="@style/Theme.Material3.DayNight.Dialog.Alert">
<item name="android:colorPrimary">@color/color_accent</item>
<item name="android:colorAccent">@color/color_accent</item>
<item name="android:textColor">@color/color_accent</item>
Expand Down
23 changes: 1 addition & 22 deletions app/src/main/res/values-v25/styles.xml
Original file line number Diff line number Diff line change
@@ -1,28 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
<item name="colorPrimary">@color/color_primary</item>
<item name="colorPrimaryDark">@color/color_primary_dark</item>
<item name="colorAccent">@color/color_accent</item>
<item name="android:colorPrimary">@color/color_primary</item>
<item name="android:colorPrimaryDark">@color/color_primary_dark</item>
<item name="android:windowBackground">@color/default_bg</item>
<item name="android:colorAccent">@color/color_accent</item>
<item name="android:colorSecondary">@color/color_accent</item>
<item name="android:alertDialogTheme">@style/AlertDialog</item>
<item name="android:dialogTheme">@style/AlertDialog</item>
<item name="android:actionBarStyle">@style/ActionBarStyle</item>
<item name="alertDialogTheme">@style/AlertDialog</item>

<item name="android:textViewStyle">@style/TextViewStyle</item>
<item name="android:buttonStyle">@style/ButtonStyle</item>

<!-- For AppCompat -->
<item name="editTextStyle">@style/EditTextStyle</item>
<item name="buttonStyle">@style/ButtonStyle</item>
<item name="preferenceTheme">@style/AppPreferenceTheme</item>

<style name="StocksWidget.App.Theme" parent="AppTheme">
<!-- v21 specific -->
<item name="android:statusBarColor">@color/transparent</item>
<item name="android:navigationBarColor">@color/nav_bar_bg</item>
Expand Down
28 changes: 3 additions & 25 deletions app/src/main/res/values-v27/styles.xml
Original file line number Diff line number Diff line change
@@ -1,35 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
<item name="colorPrimary">@color/color_primary</item>
<item name="colorPrimaryDark">@color/color_primary_dark</item>
<item name="colorAccent">@color/color_accent</item>
<item name="android:colorPrimary">@color/color_primary</item>
<item name="android:colorPrimaryDark">@color/color_primary_dark</item>
<item name="android:windowBackground">@color/default_bg</item>
<item name="android:colorAccent">@color/color_accent</item>
<item name="android:colorSecondary">@color/color_accent</item>
<item name="android:alertDialogTheme">@style/AlertDialog</item>
<item name="android:dialogTheme">@style/AlertDialog</item>
<item name="android:actionBarStyle">@style/ActionBarStyle</item>
<item name="alertDialogTheme">@style/AlertDialog</item>

<item name="android:textViewStyle">@style/TextViewStyle</item>
<item name="android:buttonStyle">@style/ButtonStyle</item>

<!-- For AppCompat -->
<item name="editTextStyle">@style/EditTextStyle</item>
<item name="buttonStyle">@style/ButtonStyle</item>
<item name="preferenceTheme">@style/AppPreferenceTheme</item>

<style name="StocksWidget.App.Theme" parent="AppTheme">
<!-- v21 specific -->
<item name="android:statusBarColor">@color/transparent</item>
<item name="android:navigationBarColor">@color/nav_bar_bg</item>
<!-- v23 specific -->
<item name="android:windowLightStatusBar">true</item>
<!-- v27 specific -->
<item name="android:navigationBarDividerColor">@color/transparent</item>
<item name="android:windowLightNavigationBar">true</item>
<!-- v23 specific -->
<item name="android:windowLightStatusBar">true</item>
</style>
</resources>
4 changes: 2 additions & 2 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@
<color name="text_3">#4d4d4d</color>
<color name="text_4">#373737</color>
<color name="text_inverse">#f2f2f2</color>
<color name="button_text">#f1f1f1</color>
<color name="button_text">#5e5e5e</color>
<color name="icon_tint">#1b1b1b</color>
<color name="home_toolbar_scrim">@color/bg_toolbar</color>
<color name="tab_text">@color/text_1</color>
<color name="tab_text_selected">@color/text_4</color>
<color name="tab_background">@color/transparent</color>
<color name="snackbar_bg">@color/color_accent</color>
<color name="snackbar_text">@color/white</color>
<color name="home_toolbar_scrim">@color/transparent</color>
</resources>
2 changes: 1 addition & 1 deletion app/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<dimen name="suggestions_padding">5dp</dimen>

<dimen name="text_size">15sp</dimen>
<dimen name="button_text">13sp</dimen>
<dimen name="button_text">11sp</dimen>
<dimen name="graph_bottom_offset">8dp</dimen>

<integer name="text_size_small">12</integer>
Expand Down
Loading

0 comments on commit 4374940

Please sign in to comment.