Skip to content

Commit 48d758b

Browse files
committed
Refresh visual theme foundation
1 parent fb34fd6 commit 48d758b

10 files changed

Lines changed: 218 additions & 63 deletions

File tree

app/src/main/res/drawable/menu_selector.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@
1818
-->
1919

2020
<selector xmlns:android="http://schemas.android.com/apk/res/android">
21-
<item android:color="@color/selected" android:state_checked="true" />
22-
<item android:color="@color/regular" android:state_checked="false" />
21+
<item android:color="?attr/colorPrimary" android:state_checked="true" />
22+
<item android:color="?attr/colorOnSurfaceVariant" android:state_checked="false" />
2323
</selector>
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
~ WiFiAnalyzer
4+
~ Copyright (C) 2015 - 2026 VREM Software Development <VREMSoftwareDevelopment@gmail.com>
5+
~
6+
~ This program is free software: you can redistribute it and/or modify
7+
~ it under the terms of the GNU General Public License as published by
8+
~ the Free Software Foundation, either version 3 of the License, or
9+
~ (at your option) any later version.
10+
~
11+
~ This program is distributed in the hope that it will be useful,
12+
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
~ GNU General Public License for more details.
15+
~
16+
~ You should have received a copy of the GNU General Public License
17+
~ along with this program. If not, see <http://www.gnu.org/licenses/>
18+
-->
19+
<selector xmlns:android="http://schemas.android.com/apk/res/android">
20+
<item android:state_checked="true">
21+
<inset
22+
android:insetLeft="12dp"
23+
android:insetTop="4dp"
24+
android:insetRight="12dp"
25+
android:insetBottom="4dp">
26+
<shape android:shape="rectangle">
27+
<corners android:radius="16dp" />
28+
<solid android:color="@color/brand_primary_container" />
29+
</shape>
30+
</inset>
31+
</item>
32+
<item android:drawable="@android:color/transparent" />
33+
</selector>

app/src/main/res/layout/main_activity.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
android:id="@+id/drawer_layout"
2424
android:layout_width="match_parent"
2525
android:layout_height="match_parent"
26+
android:background="@color/background"
2627
android:fitsSystemWindows="true"
2728
tools:openDrawer="start">
2829

@@ -33,11 +34,10 @@
3334
android:layout_width="wrap_content"
3435
android:layout_height="match_parent"
3536
android:layout_gravity="start"
37+
android:background="?attr/colorSurface"
3638
android:fitsSystemWindows="true"
3739
android:saveEnabled="false"
3840
app:headerLayout="@layout/main_navigation"
39-
app:itemIconTint="@drawable/menu_selector"
40-
app:itemTextColor="@drawable/menu_selector"
4141
app:menu="@menu/nav_drawer_menu" />
4242

4343
</androidx.drawerlayout.widget.DrawerLayout>

app/src/main/res/layout/main_connection.xml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,12 @@
2727
android:id="@+id/connection"
2828
android:layout_width="match_parent"
2929
android:layout_height="wrap_content"
30-
android:background="@color/background"
30+
android:background="@color/surface_container_high"
3131
android:orientation="vertical"
32-
android:paddingLeft="@dimen/activity_horizontal_margin"
33-
android:paddingRight="@dimen/activity_horizontal_margin"
32+
android:paddingStart="@dimen/activity_horizontal_margin"
33+
android:paddingTop="@dimen/activity_vertical_half_margin"
34+
android:paddingEnd="@dimen/activity_horizontal_margin"
35+
android:paddingBottom="@dimen/activity_vertical_half_margin"
3436
android:visibility="gone"
3537
tools:visibility="visible">
3638

@@ -77,7 +79,8 @@
7779
<View
7880
android:layout_width="match_parent"
7981
android:layout_height="1dp"
80-
android:background="@color/selected" />
82+
android:layout_marginTop="@dimen/activity_vertical_half_margin"
83+
android:background="@color/outline" />
8184
</LinearLayout>
8285

8386
<include layout="@layout/main_wifi_support" />

app/src/main/res/layout/main_content.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
2121
xmlns:app="http://schemas.android.com/apk/res-auto"
2222
android:layout_width="match_parent"
23-
android:layout_height="wrap_content"
23+
android:layout_height="match_parent"
24+
android:background="@color/background"
2425
android:orientation="vertical">
2526

2627
<include layout="@layout/main_toolbar" />
@@ -31,16 +32,17 @@
3132
android:layout_width="match_parent"
3233
android:layout_height="0dp"
3334
android:layout_weight="1"
35+
android:background="@color/background"
3436
android:orientation="vertical"
35-
android:paddingLeft="@dimen/activity_horizontal_margin"
37+
android:paddingStart="@dimen/activity_horizontal_margin"
3638
android:paddingTop="@dimen/activity_vertical_margin"
37-
android:paddingRight="@dimen/activity_horizontal_margin"
39+
android:paddingEnd="@dimen/activity_horizontal_margin"
3840
android:paddingBottom="@dimen/activity_vertical_margin">
3941

4042
<FrameLayout
4143
android:id="@+id/main_fragment"
4244
android:layout_width="match_parent"
43-
android:layout_height="wrap_content" />
45+
android:layout_height="match_parent" />
4446

4547
</LinearLayout>
4648

@@ -49,9 +51,7 @@
4951
android:layout_width="match_parent"
5052
android:layout_height="wrap_content"
5153
android:layout_alignParentBottom="true"
52-
android:background="@color/primary_material_dark"
53-
app:itemIconTint="@drawable/menu_selector"
54-
app:itemTextColor="@drawable/menu_selector"
54+
android:background="?attr/colorSurface"
5555
app:labelVisibilityMode="labeled"
5656
app:menu="@menu/nav_bottom_menu" />
5757

app/src/main/res/layout/main_navigation.xml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
2121
android:layout_width="match_parent"
2222
android:layout_height="@dimen/nav_header_height"
23-
android:background="@color/background"
23+
android:background="@color/drawer_header_background"
2424
android:gravity="bottom"
2525
android:orientation="horizontal"
2626
android:paddingBottom="@dimen/activity_vertical_margin"
27-
android:paddingLeft="@dimen/activity_horizontal_margin"
28-
android:paddingRight="@dimen/activity_horizontal_margin"
27+
android:paddingStart="@dimen/activity_horizontal_margin"
28+
android:paddingEnd="@dimen/activity_horizontal_margin"
2929
android:paddingTop="@dimen/activity_vertical_margin">
3030

3131
<ImageView
@@ -38,9 +38,10 @@
3838
<TextView
3939
android:layout_width="match_parent"
4040
android:layout_height="wrap_content"
41-
android:paddingLeft="@dimen/activity_horizontal_margin"
42-
android:paddingRight="@dimen/activity_horizontal_margin"
41+
android:paddingStart="@dimen/activity_horizontal_margin"
42+
android:paddingEnd="@dimen/activity_horizontal_margin"
4343
android:text="@string/app_full_name"
44+
android:textColor="@color/on_surface"
4445
android:textStyle="bold" />
4546

4647
</LinearLayout>

app/src/main/res/layout/main_toolbar.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,22 @@
2020
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
2121
android:layout_width="match_parent"
2222
android:layout_height="wrap_content"
23+
android:background="?attr/colorSurface"
2324
android:fitsSystemWindows="true">
2425

2526
<com.google.android.material.appbar.AppBarLayout
2627
android:layout_width="match_parent"
2728
android:layout_height="wrap_content"
29+
android:background="?attr/colorSurface"
30+
android:elevation="0dp"
2831
android:theme="@style/ThemeOverlay">
2932

3033
<androidx.appcompat.widget.Toolbar
3134
android:id="@+id/toolbar"
3235
android:layout_width="match_parent"
33-
android:layout_height="?attr/actionBarSize" />
36+
android:layout_height="?attr/actionBarSize"
37+
android:paddingStart="@dimen/activity_horizontal_margin"
38+
android:paddingEnd="@dimen/activity_horizontal_margin" />
3439

3540
</com.google.android.material.appbar.AppBarLayout>
3641

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
~ WiFiAnalyzer
4+
~ Copyright (C) 2015 - 2026 VREM Software Development <VREMSoftwareDevelopment@gmail.com>
5+
~
6+
~ This program is free software: you can redistribute it and/or modify
7+
~ it under the terms of the GNU General Public License as published by
8+
~ the Free Software Foundation, either version 3 of the License, or
9+
~ (at your option) any later version.
10+
~
11+
~ This program is distributed in the hope that it will be useful,
12+
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
~ GNU General Public License for more details.
15+
~
16+
~ You should have received a copy of the GNU General Public License
17+
~ along with this program. If not, see <http://www.gnu.org/licenses/>
18+
-->
19+
<resources>
20+
<color name="brand_primary">#A8C7FA</color>
21+
<color name="brand_on_primary">#0A1B33</color>
22+
<color name="brand_primary_container">#20406C</color>
23+
<color name="brand_on_primary_container">#D7E3FF</color>
24+
25+
<color name="surface">#101418</color>
26+
<color name="surface_variant">#1F2630</color>
27+
<color name="surface_container">#171C22</color>
28+
<color name="surface_container_high">#20262E</color>
29+
<color name="on_surface">#E3E9F1</color>
30+
<color name="on_surface_variant">#AAB5C3</color>
31+
<color name="outline">#3C4654</color>
32+
<color name="drawer_header_background">#16202B</color>
33+
34+
<color name="regular">@color/on_surface_variant</color>
35+
<color name="selected">@color/brand_primary</color>
36+
<color name="channel">@color/on_surface_variant</color>
37+
<color name="channel_number">#5ED3CD</color>
38+
<color name="frequency">#83B8FF</color>
39+
<color name="security">#D7CCC8</color>
40+
<color name="distance">#86D993</color>
41+
<color name="error">#FFB4AB</color>
42+
<color name="warning">#F3C969</color>
43+
<color name="success">#86D993</color>
44+
<color name="background">@color/surface</color>
45+
<color name="black">#000000</color>
46+
</resources>

app/src/main/res/values/colors.xml

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,30 +16,31 @@
1616
~ You should have received a copy of the GNU General Public License
1717
~ along with this program. If not, see <http://www.gnu.org/licenses/>
1818
-->
19-
2019
<resources>
21-
<!-- grey_500 -->
22-
<color name="regular">#9E9E9E</color>
23-
<!-- blue_500 -->
24-
<color name="selected">#2196F3</color>
25-
<!-- grey_500 -->
26-
<color name="channel">@color/regular</color>
27-
<!-- cyan_500 -->
28-
<color name="channel_number">#00BCD4</color>
29-
<!-- cyan_700 -->
30-
<color name="frequency">#0097A7</color>
31-
<!-- blue_grey_500 -->
32-
<color name="security">#607D8B</color>
33-
<!-- teal_500 -->
34-
<color name="distance">#009688</color>
35-
<!-- red_500 -->
36-
<color name="error">#F44336</color>
37-
<!-- amber_500 -->
38-
<color name="warning">#FFC107</color>
39-
<!-- green_500 -->
40-
<color name="success">#4CAF50</color>
41-
<!-- background -->
42-
<color name="background">#757575</color>
43-
<!-- black -->
20+
<color name="brand_primary">#1A73E8</color>
21+
<color name="brand_on_primary">#FFFFFF</color>
22+
<color name="brand_primary_container">#D7E3FF</color>
23+
<color name="brand_on_primary_container">#001B3D</color>
24+
25+
<color name="surface">#F4F7FB</color>
26+
<color name="surface_variant">#E3EAF4</color>
27+
<color name="surface_container">#FFFFFF</color>
28+
<color name="surface_container_high">#EDF2F8</color>
29+
<color name="on_surface">#15202B</color>
30+
<color name="on_surface_variant">#5F6B7A</color>
31+
<color name="outline">#C7D0DD</color>
32+
<color name="drawer_header_background">#E8F0FE</color>
33+
34+
<color name="regular">@color/on_surface_variant</color>
35+
<color name="selected">@color/brand_primary</color>
36+
<color name="channel">@color/on_surface_variant</color>
37+
<color name="channel_number">#0B8A83</color>
38+
<color name="frequency">#1565C0</color>
39+
<color name="security">#6D4C41</color>
40+
<color name="distance">#2E7D32</color>
41+
<color name="error">#BA1A1A</color>
42+
<color name="warning">#9A6700</color>
43+
<color name="success">#2E7D32</color>
44+
<color name="background">@color/surface</color>
4445
<color name="black">#000000</color>
4546
</resources>

0 commit comments

Comments
 (0)