diff options
author | Guillaume Jacquart <guillaume.jacquart@hoodbrains.com> | 2022-03-21 17:13:10 +0000 |
---|---|---|
committer | Guillaume Jacquart <guillaume.jacquart@hoodbrains.com> | 2022-03-21 17:13:10 +0000 |
commit | 43e303886715d6115273cfba014a54805d3a1389 (patch) | |
tree | 799c478bff90fcada978801801b198873aad9338 /app/src/main/res | |
parent | d534cee490986771896f4fd2ca07742007ab6751 (diff) |
Add PVC Widget #5076
Diffstat (limited to 'app/src/main/res')
-rw-r--r-- | app/src/main/res/drawable/bg_graph_bar.xml | 20 | ||||
-rw-r--r-- | app/src/main/res/drawable/bg_widget.xml | 28 | ||||
-rw-r--r-- | app/src/main/res/drawable/dummy_img_map_picker.png | bin | 339121 -> 0 bytes | |||
-rw-r--r-- | app/src/main/res/drawable/dummy_leakage_analytics.png | bin | 25328 -> 0 bytes | |||
-rw-r--r-- | app/src/main/res/drawable/dummy_trackers_usage.png | bin | 16635 -> 0 bytes | |||
-rw-r--r-- | app/src/main/res/drawable/ic_quick_privacy_off.png | bin | 99093 -> 0 bytes | |||
-rw-r--r-- | app/src/main/res/drawable/ic_quick_privacy_on.png | bin | 90230 -> 0 bytes | |||
-rw-r--r-- | app/src/main/res/drawable/ic_settings.xml | 10 | ||||
-rw-r--r-- | app/src/main/res/drawable/ic_shield_off.xml | 18 | ||||
-rw-r--r-- | app/src/main/res/drawable/ic_shield_on.xml | 22 | ||||
-rw-r--r-- | app/src/main/res/drawable/ic_switch_disabled.xml | 8 | ||||
-rw-r--r-- | app/src/main/res/drawable/ic_switch_enabled.xml | 22 | ||||
-rw-r--r-- | app/src/main/res/layout/widget.xml | 391 | ||||
-rw-r--r-- | app/src/main/res/values/colors.xml | 14 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 18 | ||||
-rw-r--r-- | app/src/main/res/xml/widget_info.xml | 27 |
16 files changed, 558 insertions, 20 deletions
diff --git a/app/src/main/res/drawable/bg_graph_bar.xml b/app/src/main/res/drawable/bg_graph_bar.xml new file mode 100644 index 0000000..cdeae6e --- /dev/null +++ b/app/src/main/res/drawable/bg_graph_bar.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?><!-- + ~ Copyright (C) 2022 E FOUNDATION + ~ + ~ This program is free software: you can redistribute it and/or modify + ~ it under the terms of the GNU General Public License as published by + ~ the Free Software Foundation, either version 3 of the License, or + ~ (at your option) any later version. + ~ + ~ This program is distributed in the hope that it will be useful, + ~ but WITHOUT ANY WARRANTY; without even the implied warranty of + ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ~ GNU General Public License for more details. + ~ + ~ You should have received a copy of the GNU General Public License + ~ along with this program. If not, see <https://www.gnu.org/licenses/>. + --> + +<shape xmlns:android="http://schemas.android.com/apk/res/android"> + <solid android:color="@color/purple_200" /> +</shape>
\ No newline at end of file diff --git a/app/src/main/res/drawable/bg_widget.xml b/app/src/main/res/drawable/bg_widget.xml new file mode 100644 index 0000000..b0d91de --- /dev/null +++ b/app/src/main/res/drawable/bg_widget.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?><!-- + ~ Copyright (C) 2022 E FOUNDATION + ~ + ~ This program is free software: you can redistribute it and/or modify + ~ it under the terms of the GNU General Public License as published by + ~ the Free Software Foundation, either version 3 of the License, or + ~ (at your option) any later version. + ~ + ~ This program is distributed in the hope that it will be useful, + ~ but WITHOUT ANY WARRANTY; without even the implied warranty of + ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ~ GNU General Public License for more details. + ~ + ~ You should have received a copy of the GNU General Public License + ~ along with this program. If not, see <https://www.gnu.org/licenses/>. + --> + +<!-- +Background for widgets to make the rounded corners based on the +appWidgetRadius attribute value +--> +<shape xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="rectangle" + > + + <corners android:radius="12dp" /> + <solid android:color="@color/widget_background" /> +</shape>
\ No newline at end of file diff --git a/app/src/main/res/drawable/dummy_img_map_picker.png b/app/src/main/res/drawable/dummy_img_map_picker.png Binary files differdeleted file mode 100644 index c1cf32b..0000000 --- a/app/src/main/res/drawable/dummy_img_map_picker.png +++ /dev/null diff --git a/app/src/main/res/drawable/dummy_leakage_analytics.png b/app/src/main/res/drawable/dummy_leakage_analytics.png Binary files differdeleted file mode 100644 index 5379cd4..0000000 --- a/app/src/main/res/drawable/dummy_leakage_analytics.png +++ /dev/null diff --git a/app/src/main/res/drawable/dummy_trackers_usage.png b/app/src/main/res/drawable/dummy_trackers_usage.png Binary files differdeleted file mode 100644 index 9b7e090..0000000 --- a/app/src/main/res/drawable/dummy_trackers_usage.png +++ /dev/null diff --git a/app/src/main/res/drawable/ic_quick_privacy_off.png b/app/src/main/res/drawable/ic_quick_privacy_off.png Binary files differdeleted file mode 100644 index 90f1b04..0000000 --- a/app/src/main/res/drawable/ic_quick_privacy_off.png +++ /dev/null diff --git a/app/src/main/res/drawable/ic_quick_privacy_on.png b/app/src/main/res/drawable/ic_quick_privacy_on.png Binary files differdeleted file mode 100644 index 99f6719..0000000 --- a/app/src/main/res/drawable/ic_quick_privacy_on.png +++ /dev/null diff --git a/app/src/main/res/drawable/ic_settings.xml b/app/src/main/res/drawable/ic_settings.xml new file mode 100644 index 0000000..e68deb7 --- /dev/null +++ b/app/src/main/res/drawable/ic_settings.xml @@ -0,0 +1,10 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:pathData="M19.14,12.94C19.18,12.64 19.2,12.33 19.2,12C19.2,11.68 19.18,11.36 19.13,11.06L21.16,9.48C21.34,9.34 21.39,9.07 21.28,8.87L19.36,5.55C19.24,5.33 18.99,5.26 18.77,5.33L16.38,6.29C15.88,5.91 15.35,5.59 14.76,5.35L14.4,2.81C14.36,2.57 14.16,2.4 13.92,2.4H10.08C9.84,2.4 9.65,2.57 9.61,2.81L9.25,5.35C8.66,5.59 8.12,5.92 7.63,6.29L5.24,5.33C5.02,5.25 4.77,5.33 4.65,5.55L2.74,8.87C2.62,9.08 2.66,9.34 2.86,9.48L4.89,11.06C4.84,11.36 4.8,11.69 4.8,12C4.8,12.31 4.82,12.64 4.87,12.94L2.84,14.52C2.66,14.66 2.61,14.93 2.72,15.13L4.64,18.45C4.76,18.67 5.01,18.74 5.23,18.67L7.62,17.71C8.12,18.09 8.65,18.41 9.24,18.65L9.6,21.19C9.65,21.43 9.84,21.6 10.08,21.6H13.92C14.16,21.6 14.36,21.43 14.39,21.19L14.75,18.65C15.34,18.41 15.88,18.09 16.37,17.71L18.76,18.67C18.98,18.75 19.23,18.67 19.35,18.45L21.27,15.13C21.39,14.91 21.34,14.66 21.15,14.52L19.14,12.94ZM12,15.6C10.02,15.6 8.4,13.98 8.4,12C8.4,10.02 10.02,8.4 12,8.4C13.98,8.4 15.6,10.02 15.6,12C15.6,13.98 13.98,15.6 12,15.6Z" + android:fillColor="#ffffff" + android:fillAlpha="0.87"/> +</vector> diff --git a/app/src/main/res/drawable/ic_shield_off.xml b/app/src/main/res/drawable/ic_shield_off.xml index f3565d5..7c2fc8e 100644 --- a/app/src/main/res/drawable/ic_shield_off.xml +++ b/app/src/main/res/drawable/ic_shield_off.xml @@ -3,13 +3,13 @@ android:height="24dp" android:viewportWidth="24" android:viewportHeight="24"> - <path - android:pathData="M4,11V5.6499L12,2.0943L20,5.6499V11C20,16.0434 16.556,20.7257 12,21.9673C7.444,20.7257 4,16.0434 4,11Z" - android:strokeWidth="2" - android:fillColor="#00000000" - android:strokeColor="#F8432E"/> - <path - android:pathData="M15.1213,10.1213L15.8284,9.4142L14.4142,8L13.7071,8.7071L11.9142,10.5L10.1213,8.7071L9.4142,8L8,9.4142L8.7071,10.1213L10.5,11.9142L8.7071,13.7071L8,14.4142L9.4142,15.8284L10.1213,15.1213L11.9142,13.3284L13.7071,15.1213L14.4142,15.8284L15.8284,14.4142L15.1213,13.7071L13.3284,11.9142L15.1213,10.1213Z" - android:fillColor="#F8432E" - android:fillType="evenOdd"/> + <path + android:pathData="M4,11V5.6499L12,2.0943L20,5.6499V11C20,16.0434 16.556,20.7257 12,21.9673C7.444,20.7257 4,16.0434 4,11Z" + android:strokeWidth="2" + android:fillColor="#00000000" + android:strokeColor="#F8432E"/> + <path + android:pathData="M15.1213,10.1213L15.8284,9.4142L14.4142,8L13.7071,8.7071L11.9142,10.5L10.1213,8.7071L9.4142,8L8,9.4142L8.7071,10.1213L10.5,11.9142L8.7071,13.7071L8,14.4142L9.4142,15.8284L10.1213,15.1213L11.9142,13.3284L13.7071,15.1213L14.4142,15.8284L15.8284,14.4142L15.1213,13.7071L13.3284,11.9142L15.1213,10.1213Z" + android:fillColor="#F8432E" + android:fillType="evenOdd"/> </vector> diff --git a/app/src/main/res/drawable/ic_shield_on.xml b/app/src/main/res/drawable/ic_shield_on.xml index 39416ed..b70dc6e 100644 --- a/app/src/main/res/drawable/ic_shield_on.xml +++ b/app/src/main/res/drawable/ic_shield_on.xml @@ -3,15 +3,15 @@ android:height="25dp" android:viewportWidth="24" android:viewportHeight="25"> - <path - android:pathData="M4,11.5V6.1499L12,2.5943L20,6.1499V11.5C20,16.5434 16.556,21.2257 12,22.4673C7.444,21.2257 4,16.5434 4,11.5Z" - android:strokeWidth="2" - android:fillColor="#00000000" - android:strokeColor="#2CC766"/> - <path - android:pathData="M9,12.9234L10.6951,14.5L15,10.5" - android:strokeWidth="2" - android:fillColor="#00000000" - android:strokeColor="#2CC766" - android:strokeLineCap="square"/> + <path + android:pathData="M4,11.5V6.1499L12,2.5943L20,6.1499V11.5C20,16.5434 16.556,21.2257 12,22.4673C7.444,21.2257 4,16.5434 4,11.5Z" + android:strokeWidth="2" + android:fillColor="#00000000" + android:strokeColor="#2CC766"/> + <path + android:pathData="M9,12.9234L10.6951,14.5L15,10.5" + android:strokeWidth="2" + android:fillColor="#00000000" + android:strokeColor="#2CC766" + android:strokeLineCap="square"/> </vector> diff --git a/app/src/main/res/drawable/ic_switch_disabled.xml b/app/src/main/res/drawable/ic_switch_disabled.xml new file mode 100644 index 0000000..4158483 --- /dev/null +++ b/app/src/main/res/drawable/ic_switch_disabled.xml @@ -0,0 +1,8 @@ +<vector android:height="30dp" android:viewportHeight="29" + android:viewportWidth="53" android:width="54.827587dp" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:fillAlpha="0.38" android:fillColor="#ffffff" android:pathData="M14.5,0L38.5,0A14.5,14.5 0,0 1,53 14.5L53,14.5A14.5,14.5 0,0 1,38.5 29L14.5,29A14.5,14.5 0,0 1,0 14.5L0,14.5A14.5,14.5 0,0 1,14.5 0z"/> + <path android:fillColor="#121212" android:fillType="evenOdd" android:pathData="M14.9869,26.9286C21.9321,26.9286 27.5623,21.3641 27.5623,14.5C27.5623,7.6359 21.9321,2.0714 14.9869,2.0714C8.0417,2.0714 2.4115,7.6359 2.4115,14.5C2.4115,21.3641 8.0417,26.9286 14.9869,26.9286Z"/> + <path android:fillAlpha="0.05" android:fillColor="#ffffff" + android:fillType="evenOdd" android:pathData="M14.9869,26.9286C21.9321,26.9286 27.5623,21.3641 27.5623,14.5C27.5623,7.6359 21.9321,2.0714 14.9869,2.0714C8.0417,2.0714 2.4115,7.6359 2.4115,14.5C2.4115,21.3641 8.0417,26.9286 14.9869,26.9286Z"/> + <path android:fillColor="#ffffff" android:fillType="evenOdd" android:pathData="M14.9869,26.9286C21.9321,26.9286 27.5623,21.3641 27.5623,14.5C27.5623,7.6359 21.9321,2.0714 14.9869,2.0714C8.0417,2.0714 2.4115,7.6359 2.4115,14.5C2.4115,21.3641 8.0417,26.9286 14.9869,26.9286Z"/> +</vector> diff --git a/app/src/main/res/drawable/ic_switch_enabled.xml b/app/src/main/res/drawable/ic_switch_enabled.xml new file mode 100644 index 0000000..10e83f7 --- /dev/null +++ b/app/src/main/res/drawable/ic_switch_enabled.xml @@ -0,0 +1,22 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="55dp" + android:height="30dp" + android:viewportWidth="55" + android:viewportHeight="30"> + <path + android:pathData="M15.3417,0L40.3417,0A14.5,14.5 0,0 1,54.8417 14.5L54.8417,14.5A14.5,14.5 0,0 1,40.3417 29L15.3417,29A14.5,14.5 0,0 1,0.8417 14.5L0.8417,14.5A14.5,14.5 0,0 1,15.3417 0z" + android:fillColor="#2CC766"/> + <path + android:pathData="M39.5854,26.9286C46.6616,26.9286 52.398,21.3642 52.398,14.5C52.398,7.6359 46.6616,2.0715 39.5854,2.0715C32.5091,2.0715 26.7727,7.6359 26.7727,14.5C26.7727,21.3642 32.5091,26.9286 39.5854,26.9286Z" + android:fillColor="#121212" + android:fillType="evenOdd"/> + <path + android:pathData="M39.5854,26.9286C46.6616,26.9286 52.398,21.3642 52.398,14.5C52.398,7.6359 46.6616,2.0715 39.5854,2.0715C32.5091,2.0715 26.7727,7.6359 26.7727,14.5C26.7727,21.3642 32.5091,26.9286 39.5854,26.9286Z" + android:fillColor="#ffffff" + android:fillAlpha="0.05" + android:fillType="evenOdd"/> + <path + android:pathData="M39.5854,26.9286C46.6616,26.9286 52.398,21.3642 52.398,14.5C52.398,7.6359 46.6616,2.0715 39.5854,2.0715C32.5091,2.0715 26.7727,7.6359 26.7727,14.5C26.7727,21.3642 32.5091,26.9286 39.5854,26.9286Z" + android:fillColor="#ffffff" + android:fillType="evenOdd"/> +</vector> diff --git a/app/src/main/res/layout/widget.xml b/app/src/main/res/layout/widget.xml new file mode 100644 index 0000000..612221a --- /dev/null +++ b/app/src/main/res/layout/widget.xml @@ -0,0 +1,391 @@ +<!-- + ~ Copyright (C) 2022 E FOUNDATION + ~ + ~ This program is free software: you can redistribute it and/or modify + ~ it under the terms of the GNU General Public License as published by + ~ the Free Software Foundation, either version 3 of the License, or + ~ (at your option) any later version. + ~ + ~ This program is distributed in the hope that it will be useful, + ~ but WITHOUT ANY WARRANTY; without even the implied warranty of + ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ~ GNU General Public License for more details. + ~ + ~ You should have received a copy of the GNU General Public License + ~ along with this program. If not, see <https://www.gnu.org/licenses/>. + --> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:layout_height="match_parent" + android:layout_width="match_parent" + android:orientation="vertical" + android:background="@drawable/bg_widget" + > + <LinearLayout + android:layout_width="match_parent" + android:layout_height="40dp" + android:orientation="horizontal" + android:gravity="center_vertical"> + <TextView + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:layout_marginLeft="12dp" + android:textSize="16sp" + android:textColor="@color/on_surface_high_emphasis" + android:textAllCaps="true" + android:text="@string/widget_title" + /> + <ImageView + android:id="@+id/settings_btn" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:padding="8dp" + android:src="@drawable/ic_settings" + /> + </LinearLayout> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:gravity="center_vertical" + android:layout_marginHorizontal="24dp" + android:layout_marginTop="16dp" + > + <ImageView + android:id="@+id/state_icon" + android:layout_height="25dp" + android:layout_width="24dp" + android:src="@drawable/ic_shield_off" + android:scaleType="fitCenter" + /> + <TextView + android:id="@+id/state_label" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:layout_marginLeft="8dp" + android:text="@string/widget_state_title_off" + android:textSize="12sp" + android:textColor="@color/on_primary_medium_emphasis" + /> + <ImageView + android:id="@+id/toggle_privacy_central" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:src="@drawable/ic_switch_disabled" + /> + + </LinearLayout> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:layout_marginHorizontal="24dp" + android:layout_marginTop="16dp" + android:layout_marginBottom="16dp"> + <LinearLayout + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:orientation="vertical" + > + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/dashboard_state_trackers_label" + android:textSize="10sp" + android:textColor="@color/on_primary_disabled" + android:layout_marginBottom="4dp" + android:textAllCaps="true" + /> + <TextView + android:id="@+id/state_trackers" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/dashboard_state_trackers_off" + android:textSize="14sp" + android:textColor="@color/on_primary_high_emphasis" + android:textAllCaps="true" + /> + </LinearLayout> + <LinearLayout + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:orientation="vertical" + > + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/dashboard_state_geolocation_label" + android:textSize="10sp" + android:textColor="@color/on_primary_disabled" + android:layout_marginBottom="4dp" + android:textAllCaps="true" + /> + <TextView + android:id="@+id/state_geolocation" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/dashboard_state_geolocation_off" + android:textSize="14sp" + android:textColor="@color/on_primary_high_emphasis" + android:textAllCaps="true" + /> + </LinearLayout> + <LinearLayout + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:orientation="vertical" + > + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/dashboard_state_ipaddress_label" + android:textSize="10sp" + android:textColor="@color/on_primary_disabled" + android:layout_marginBottom="4dp" + android:textAllCaps="true" + /> + <TextView + android:id="@+id/state_ip_address" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/dashboard_state_ipaddress_off" + android:textSize="14sp" + android:textColor="@color/on_primary_high_emphasis" + android:textAllCaps="true" + android:visibility="gone" + /> + <ProgressBar + android:id="@+id/state_ip_address_loader" + android:layout_width="16dp" + android:layout_height="16dp" + android:indeterminate="true" + android:visibility="visible"/> + </LinearLayout> + </LinearLayout> + + + <LinearLayout + android:layout_width="match_parent" + android:layout_marginTop="16dp" + android:layout_marginHorizontal="24dp" + android:layout_height="26dp" + > + <ImageView + android:id="@+id/widget_graph_bar_0" + android:layout_width="0dp" + android:layout_weight="1" + android:layout_height="match_parent" + android:src="@color/accent" + android:layout_marginRight="1.5dp" + /> + <ImageView + android:id="@+id/widget_graph_bar_1" + android:layout_width="0dp" + android:layout_weight="1" + android:layout_height="match_parent" + android:src="@color/accent" + android:layout_marginRight="1.5dp" + /> + <ImageView + android:id="@+id/widget_graph_bar_2" + android:layout_width="0dp" + android:layout_weight="1" + android:layout_height="match_parent" + android:src="@color/accent" + android:layout_marginRight="1.5dp" + /> + <ImageView + android:id="@+id/widget_graph_bar_3" + android:layout_width="0dp" + android:layout_weight="1" + android:layout_height="match_parent" + android:src="@color/accent" + android:layout_marginRight="1.5dp" + /> + <ImageView + android:id="@+id/widget_graph_bar_4" + android:layout_width="0dp" + android:layout_weight="1" + android:layout_height="match_parent" + android:src="@color/accent" + android:layout_marginRight="1.5dp" + /> + <ImageView + android:id="@+id/widget_graph_bar_5" + android:layout_width="0dp" + android:layout_weight="1" + android:layout_height="match_parent" + android:src="@color/accent" + android:layout_marginRight="1.5dp" + /> + <ImageView + android:id="@+id/widget_graph_bar_6" + android:layout_width="0dp" + android:layout_weight="1" + android:layout_height="match_parent" + android:src="@color/accent" + android:layout_marginRight="1.5dp" + /> + <ImageView + android:id="@+id/widget_graph_bar_7" + android:layout_width="0dp" + android:layout_weight="1" + android:layout_height="match_parent" + android:src="@color/accent" + android:layout_marginRight="1.5dp" + /> + <ImageView + android:id="@+id/widget_graph_bar_8" + android:layout_width="0dp" + android:layout_weight="1" + android:layout_height="match_parent" + android:src="@color/accent" + android:layout_marginRight="1.5dp" + /> + <ImageView + android:id="@+id/widget_graph_bar_9" + android:layout_width="0dp" + android:layout_weight="1" + android:layout_height="match_parent" + android:src="@color/accent" + android:layout_marginRight="1.5dp" + /> + <ImageView + android:id="@+id/widget_graph_bar_10" + android:layout_width="0dp" + android:layout_weight="1" + android:layout_height="match_parent" + android:src="@color/accent" + android:layout_marginRight="1.5dp" + /> + <ImageView + android:id="@+id/widget_graph_bar_11" + android:layout_width="0dp" + android:layout_weight="1" + android:layout_height="match_parent" + android:src="@color/accent" + android:layout_marginRight="1.5dp" + /> + <ImageView + android:id="@+id/widget_graph_bar_12" + android:layout_width="0dp" + android:layout_weight="1" + android:layout_height="match_parent" + android:src="@color/accent" + android:layout_marginRight="1.5dp" + /> + <ImageView + android:id="@+id/widget_graph_bar_13" + android:layout_width="0dp" + android:layout_weight="1" + android:layout_height="match_parent" + android:src="@color/accent" + android:layout_marginRight="1.5dp" + /> + <ImageView + android:id="@+id/widget_graph_bar_14" + android:layout_width="0dp" + android:layout_weight="1" + android:layout_height="match_parent" + android:src="@color/accent" + android:layout_marginRight="1.5dp" + /> + <ImageView + android:id="@+id/widget_graph_bar_15" + android:layout_width="0dp" + android:layout_weight="1" + android:layout_height="match_parent" + android:src="@color/accent" + android:layout_marginRight="1.5dp" + /> + <ImageView + android:id="@+id/widget_graph_bar_16" + android:layout_width="0dp" + android:layout_weight="1" + android:layout_height="match_parent" + android:src="@color/accent" + android:layout_marginRight="1.5dp" + /> + <ImageView + android:id="@+id/widget_graph_bar_17" + android:layout_width="0dp" + android:layout_weight="1" + android:layout_height="match_parent" + android:src="@color/accent" + android:layout_marginRight="1.5dp" + /> + <ImageView + android:id="@+id/widget_graph_bar_18" + android:layout_width="0dp" + android:layout_weight="1" + android:layout_height="match_parent" + android:src="@color/accent" + android:layout_marginRight="1.5dp" + /> + <ImageView + android:id="@+id/widget_graph_bar_19" + android:layout_width="0dp" + android:layout_weight="1" + android:layout_height="match_parent" + android:src="@color/accent" + android:layout_marginRight="1.5dp" + /> + <ImageView + android:id="@+id/widget_graph_bar_20" + android:layout_width="0dp" + android:layout_weight="1" + android:layout_height="match_parent" + android:src="@color/accent" + android:layout_marginRight="1.5dp" + /> + <ImageView + android:id="@+id/widget_graph_bar_21" + android:layout_width="0dp" + android:layout_weight="1" + android:layout_height="match_parent" + android:src="@color/accent" + android:layout_marginRight="1.5dp" + /> + <ImageView + android:id="@+id/widget_graph_bar_22" + android:layout_width="0dp" + android:layout_weight="1" + android:layout_height="match_parent" + android:src="@color/accent" + android:layout_marginRight="1.5dp" + /> + <ImageView + android:id="@+id/widget_graph_bar_23" + android:layout_width="0dp" + android:layout_weight="1" + android:layout_height="match_parent" + android:src="@color/accent" + /> + </LinearLayout> + +<!-- <com.github.mikephil.charting.charts.BarChart--> +<!-- android:id="@+id/graph"--> +<!-- android:layout_height="144dp"--> +<!-- android:layout_width="match_parent"--> +<!-- android:layout_marginHorizontal="24dp"--> +<!-- />--> + + <TextView + android:id="@+id/graph_legend" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + tools:text="0 Trackers" + android:textSize="12sp" + android:textColor="@color/on_primary_high_emphasis" + android:layout_marginTop="16dp" + android:layout_marginHorizontal="24dp" + android:layout_marginBottom="24dp" + /> + +</LinearLayout>
\ No newline at end of file diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index d867b74..2bf09cc 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -26,4 +26,18 @@ <color name="e_blue2">@lineageos.platform:color/color_default_blue1</color> <color name="dark_color">#263238</color> <color name="blue_unselected">#AADCFE</color> + <color name="light_blue_50">#FFE1F5FE</color> + <color name="light_blue_200">#FF81D4FA</color> + <color name="light_blue_600">#FF039BE5</color> + <color name="light_blue_900">#FF01579B</color> + + + <!-- Widget --> + <color name="on_surface_high_emphasis">#DEFFFFFF</color> + <color name="on_primary_medium_emphasis">#BDFFFFFF</color> + <color name="on_primary_high_emphasis">#FFFFFF</color> + <color name="on_primary_disabled">#61FFFFFF</color> + + <color name="widget_background">#33000000</color> + </resources>
\ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 30f017c..a0df574 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -113,4 +113,22 @@ <string name="following_trackers_in_use">Following trackers are in use</string> <string name="enable_disable_tracker_info">Enable or disable this tracker for the following apps</string> <string name="tracker">Tracker</string> + <string name="appwidget_text">EXAMPLE</string> + <string name="add_widget">Add widget</string> + <string name="app_widget_description">This is an app widget description</string> + + <!-- Widget --> + <string name="widget_title">Extended privacy</string> + <string name="widget_state_title_on">Your online privacy is protected</string> + <string name="widget_state_title_off">Your online privacy is unprotected</string> + <string name="widget_state_trackers_label">@string/dashboard_state_trackers_label</string> + <string name="widget_state_trackers_off">@string/dashboard_state_trackers_off</string> + <string name="widget_state_trackers_on">@string/dashboard_state_trackers_on</string> + <string name="widget_state_geolocation_label">@string/dashboard_state_geolocation_label</string> + <string name="widget_state_geolocation_off">@string/dashboard_state_geolocation_off</string> + <string name="widget_state_geolocation_on">@string/dashboard_state_geolocation_on</string> + <string name="widget_state_ipaddress_label">@string/dashboard_state_ipaddress_label</string> + <string name="widget_state_ipaddress_off">@string/dashboard_state_ipaddress_off</string> + <string name="widget_state_ipaddress_on">@string/dashboard_state_ipaddress_on</string> + <string name="widget_graph_trackers_legend">@string/dashboard_graph_trackers_legend</string> </resources>
\ No newline at end of file diff --git a/app/src/main/res/xml/widget_info.xml b/app/src/main/res/xml/widget_info.xml new file mode 100644 index 0000000..b20fd31 --- /dev/null +++ b/app/src/main/res/xml/widget_info.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2022 E FOUNDATION + ~ + ~ This program is free software: you can redistribute it and/or modify + ~ it under the terms of the GNU General Public License as published by + ~ the Free Software Foundation, either version 3 of the License, or + ~ (at your option) any later version. + ~ + ~ This program is distributed in the hope that it will be useful, + ~ but WITHOUT ANY WARRANTY; without even the implied warranty of + ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ~ GNU General Public License for more details. + ~ + ~ You should have received a copy of the GNU General Public License + ~ along with this program. If not, see <https://www.gnu.org/licenses/>. + --> + +<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android" + android:initialKeyguardLayout="@layout/widget" + android:initialLayout="@layout/widget" + android:minHeight="180dp" + android:minWidth="250dp" + + android:updatePeriodMillis="0" + android:widgetCategory="home_screen" + />
\ No newline at end of file |