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/layout | |
parent | d534cee490986771896f4fd2ca07742007ab6751 (diff) |
Add PVC Widget #5076
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r-- | app/src/main/res/layout/widget.xml | 391 |
1 files changed, 391 insertions, 0 deletions
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 |