diff options
Diffstat (limited to 'app/src/main/res/layout/fragment_dashboard.xml')
-rw-r--r-- | app/src/main/res/layout/fragment_dashboard.xml | 472 |
1 files changed, 185 insertions, 287 deletions
diff --git a/app/src/main/res/layout/fragment_dashboard.xml b/app/src/main/res/layout/fragment_dashboard.xml index effd992..077eaf1 100644 --- a/app/src/main/res/layout/fragment_dashboard.xml +++ b/app/src/main/res/layout/fragment_dashboard.xml @@ -1,26 +1,16 @@ <?xml version="1.0" encoding="utf-8"?> +<layout> <androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_height="match_parent" android:layout_width="match_parent" > - <include layout="@layout/topbar" /> - - <ProgressBar - android:id="@+id/loadingSpinner" - android:indeterminate="true" - android:layout_gravity="center" - android:layout_height="wrap_content" - android:layout_width="wrap_content" - /> - <androidx.core.widget.NestedScrollView android:id="@+id/scrollContainer" android:layout_height="match_parent" android:layout_width="match_parent" - android:visibility="gone" app:layout_behavior="@string/appbar_scrolling_view_behavior" > @@ -30,314 +20,222 @@ android:layout_height="match_parent" android:layout_width="match_parent" android:orientation="vertical" - tools:context=".main.MainActivity" > <TextView - android:gravity="center" - android:layout_gravity="center_horizontal" - android:layout_height="wrap_content" + android:id="@+id/state_label" android:layout_width="match_parent" - android:paddingBottom="16dp" - android:paddingLeft="32dp" - android:paddingRight="32dp" - android:paddingTop="16dp" - android:text="@string/privacy_dashboard_info" - android:textColor="@color/black" - android:textSize="14sp" - /> - - <ImageView - android:id="@+id/togglePrivacyCentral" - android:layout_height="96dp" - android:layout_marginBottom="16dp" - android:layout_marginTop="16dp" - android:layout_width="96dp" - android:src="@drawable/ic_privacy_toggle" + android:layout_height="wrap_content" + android:layout_marginTop="24dp" + android:layout_marginBottom="4dp" + android:text="@string/dashboard_state_label_off" + android:textColor="@color/orange_off" + android:gravity="center" /> - <TextView - android:drawableEnd="@drawable/ic_chevron_right_24dp" - android:fontFamily="sans-serif-medium" - android:gravity="center" - android:id="@+id/tap_to_enable_quick_protection" - android:layout_gravity="center_horizontal" - android:layout_height="wrap_content" android:layout_width="match_parent" - android:paddingBottom="16dp" - android:paddingLeft="32dp" - android:paddingRight="32dp" - android:paddingTop="16dp" - android:text="@string/tap_to_enable_quick_protection" - android:textColor="@color/black" - android:textSize="14sp" + android:layout_height="wrap_content" + android:text="@string/dashboard_change_state_explanations" + android:gravity="center" + android:textSize="12sp" + android:textColor="@color/grey_text_2" /> <ImageView - android:layout_height="160dp" - android:layout_width="match_parent" - android:src="@drawable/dummy_leakage_analytics" - /> - - <TextView - android:gravity="center" - android:id="@+id/personal_leakag_info" - android:layout_gravity="center_horizontal" - android:layout_height="wrap_content" - android:layout_width="match_parent" - android:paddingBottom="16dp" - android:paddingLeft="32dp" - android:paddingRight="32dp" - android:text="@string/personal_leakage_info" - android:textColor="@color/black" - android:textSize="12sp" + android:id="@+id/toggle_privacy_central" + android:layout_height="120dp" + android:layout_margin="32dp" + android:layout_width="120dp" + android:src="@drawable/ic_quick_privacy_off" + android:scaleType="fitCenter" + android:background="?attr/selectableItemBackgroundBorderless" /> <LinearLayout - android:background="#f9f9f9" - android:layout_height="match_parent" android:layout_width="match_parent" - android:orientation="vertical" - > - - <RelativeLayout - android:id="@+id/am_i_tracked" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:padding="16dp" + android:layout_marginBottom="32dp"> + <LinearLayout + android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_width="match_parent" - android:paddingBottom="16dp" - android:paddingLeft="32dp" - android:paddingRight="32dp" - android:paddingTop="16dp" - > - - <ImageView - android:id="@+id/am_i_tracked_icon" - android:layout_alignParentStart="true" - android:layout_centerVertical="true" - android:layout_height="36dp" - android:layout_width="36dp" - android:src="@drawable/ic_tracked" + android:layout_weight="1" + android:orientation="vertical" + android:gravity="center"> + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/dashboard_state_trackers_label" + android:textSize="12sp" + android:textColor="@color/grey_text" + android:layout_marginBottom="8dp" /> - - <LinearLayout + <TextView + android:id="@+id/state_trackers" + android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_toEndOf="@+id/am_i_tracked_icon" - android:layout_toStartOf="@+id/am_i_tracked_chevron" - android:layout_width="match_parent" - android:orientation="vertical" - android:paddingEnd="32dp" - android:paddingStart="16dp" - > - - <TextView - android:fontFamily="sans-serif-medium" - android:id="@+id/am_i_tracked_title" - android:layout_height="wrap_content" - android:layout_width="match_parent" - android:text="@string/am_i_tracked_title" - android:textColor="@color/black" - android:textSize="16sp" - /> - - <TextView - android:id="@+id/am_i_tracked_subtitle" - android:layout_height="wrap_content" - android:layout_width="match_parent" - android:text="@string/am_i_tracked_subtitle" - android:textColor="@color/black" - android:textSize="14sp" - /> - </LinearLayout> - - <ImageView - android:id="@+id/am_i_tracked_chevron" - android:layout_alignParentEnd="true" - android:layout_centerVertical="true" - android:layout_height="24dp" - android:layout_width="24dp" - android:src="@drawable/ic_chevron_right_24dp" + android:text="@string/dashboard_state_trackers_off" + android:textSize="12sp" + android:textColor="@color/black_text" + android:textAllCaps="true" /> - </RelativeLayout> - - <RelativeLayout - android:id="@+id/apps_permissions" + </LinearLayout> + <LinearLayout + android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_width="match_parent" - android:paddingBottom="16dp" - android:paddingLeft="32dp" - android:paddingRight="32dp" - android:paddingTop="16dp" - > - - <ImageView - android:id="@+id/apps_permissions_icon" - android:layout_alignParentStart="true" - android:layout_centerVertical="true" - android:layout_height="36dp" - android:layout_width="36dp" - android:src="@drawable/ic_apps_permissions" + android:layout_weight="1" + android:orientation="vertical" + android:gravity="center"> + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/dashboard_state_geolocation_label" + android:textSize="12sp" + android:textColor="@color/grey_text" + android:layout_marginBottom="8dp" /> - - <LinearLayout + <TextView + android:id="@+id/state_geolocation" + android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_toEndOf="@+id/apps_permissions_icon" - android:layout_toStartOf="@+id/apps_permissions_chevron" - android:layout_width="match_parent" - android:orientation="vertical" - android:paddingEnd="32dp" - android:paddingStart="16dp" - > - - <TextView - android:fontFamily="sans-serif-medium" - android:id="@+id/apps_permissions_title" - android:layout_height="wrap_content" - android:layout_width="match_parent" - android:text="@string/apps_permissions_title" - android:textColor="@color/black" - android:textSize="16sp" - /> - - <TextView - android:id="@+id/apps_permissions_subtitle" - android:layout_height="wrap_content" - android:layout_width="match_parent" - android:text="@string/apps_permissions_subtitle" - android:textColor="@color/black" - android:textSize="14sp" - /> - </LinearLayout> - - <ImageView - android:id="@+id/apps_permissions_chevron" - android:layout_alignParentEnd="true" - android:layout_centerVertical="true" - android:layout_height="24dp" - android:layout_width="24dp" - android:src="@drawable/ic_chevron_right_24dp" + android:text="@string/dashboard_state_geolocation_off" + android:textSize="12sp" + android:textColor="@color/black_text" + android:textAllCaps="true" /> - </RelativeLayout> - - <RelativeLayout - android:id="@+id/my_location" + </LinearLayout> + <LinearLayout + android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_width="match_parent" - android:paddingBottom="16dp" - android:paddingLeft="32dp" - android:paddingRight="32dp" - android:paddingTop="16dp" - > - - <ImageView - android:id="@+id/my_location_icon" - android:layout_alignParentStart="true" - android:layout_centerVertical="true" - android:layout_height="36dp" - android:layout_width="36dp" - android:src="@drawable/ic_my_location" + android:layout_weight="1" + android:orientation="vertical" + android:gravity="center"> + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/dashboard_state_ipaddress_label" + android:textSize="12sp" + android:textColor="@color/grey_text" + android:layout_marginBottom="8dp" /> - - <LinearLayout + <TextView + android:id="@+id/state_ip_address" + android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_toEndOf="@+id/my_location_icon" - android:layout_toStartOf="@+id/my_location_chevron" - android:layout_width="match_parent" - android:orientation="vertical" - android:paddingEnd="32dp" - android:paddingStart="16dp" - > - - <TextView - android:fontFamily="sans-serif-medium" - android:id="@+id/my_location_title" - android:layout_height="wrap_content" - android:layout_width="match_parent" - android:text="@string/my_location_title" - android:textColor="@color/black" - android:textSize="16sp" - /> + android:text="@string/dashboard_state_ipaddress_off" + android:textSize="12sp" + android:textColor="@color/black_text" + android:textAllCaps="true" + /> + </LinearLayout> + </LinearLayout> - <TextView - android:id="@+id/my_location_subtitle" - android:layout_height="wrap_content" - android:layout_width="match_parent" - android:text="@string/my_location_subtitle" - android:textColor="@color/black" - android:textSize="14sp" - /> - </LinearLayout> - <ImageView - android:id="@+id/my_location_chevron" - android:layout_alignParentEnd="true" - android:layout_centerVertical="true" - android:layout_height="24dp" - android:layout_width="24dp" - android:src="@drawable/ic_chevron_right_24dp" - /> - </RelativeLayout> + <androidx.constraintlayout.widget.ConstraintLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:padding="16dp"> + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/dashboard_graph_label" + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintTop_toTopOf="parent" + /> - <RelativeLayout - android:id="@+id/internet_activity_privacy" + <TextView + android:id="@+id/graph_period" android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:text="@string/dashboard_graph_period" + android:textSize="14sp" + android:textColor="@color/grey_text_2" + app:layout_constraintRight_toRightOf="parent" + app:layout_constraintTop_toTopOf="parent" + /> + +<!-- <TextView--> +<!-- android:id="@+id/graph_total"--> +<!-- android:layout_width="wrap_content"--> +<!-- android:layout_height="wrap_content"--> +<!-- android:text="200 hits"--> +<!-- app:layout_constraintRight_toRightOf="parent"--> +<!-- app:layout_constraintTop_toBottomOf="@+id/graph_period"--> +<!-- />--> + <ImageView + android:id="@+id/graph" + android:layout_height="160dp" android:layout_width="match_parent" - android:paddingBottom="16dp" - android:paddingLeft="32dp" - android:paddingRight="32dp" - android:paddingTop="16dp" - > - - <ImageView - android:id="@+id/internet_activity_privacy_icon" - android:layout_alignParentStart="true" - android:layout_centerVertical="true" - android:layout_height="36dp" - android:layout_width="36dp" - android:src="@drawable/ic_internet_activity" - /> - - <LinearLayout - android:layout_height="wrap_content" - android:layout_toEndOf="@+id/internet_activity_privacy_icon" - android:layout_toStartOf="@+id/internet_activity_privacy_chevron" - android:layout_width="match_parent" - android:orientation="vertical" - android:paddingEnd="32dp" - android:paddingStart="16dp" - > - - <TextView - android:fontFamily="sans-serif-medium" - android:id="@+id/internet_activity_privacy_title" - android:layout_height="wrap_content" - android:layout_width="match_parent" - android:text="@string/internet_activity_privacy_title" - android:textColor="@color/black" - android:textSize="16sp" - /> - - <TextView - android:id="@+id/internet_activity_privacy_subtitle" - android:layout_height="wrap_content" - android:layout_width="match_parent" - android:text="@string/internet_activity_privacy_subtitle" - android:textColor="@color/black" - android:textSize="14sp" - /> - </LinearLayout> + android:src="@drawable/dummy_leakage_analytics" + app:layout_constraintTop_toBottomOf="@+id/graph_period" + /> + </androidx.constraintlayout.widget.ConstraintLayout> + + <include + layout="@layout/dashboard_item_submenu_button" + android:id="@+id/am_i_tracked" + android:layout_width="match_parent" + android:layout_height="wrap_content" + app:icon="@{@drawable/ic_tracked}" + app:title="@{@string/dashboard_am_i_tracked_title}" + app:subTitle='@{""}' + /> + <View + android:layout_width="match_parent" + android:layout_height="1dp" + android:layout_marginStart="48dp" + android:background="@color/grey_divider" + /> - <ImageView - android:id="@+id/internet_activity_privacy_chevron" - android:layout_alignParentEnd="true" - android:layout_centerVertical="true" - android:layout_height="24dp" - android:layout_width="24dp" - android:src="@drawable/ic_chevron_right_24dp" - /> - </RelativeLayout> + <include + layout="@layout/dashboard_item_submenu_button" + android:id="@+id/apps_permissions" + android:layout_width="match_parent" + android:layout_height="wrap_content" + app:icon="@{@drawable/ic_apps_permissions}" + app:title="@{@string/dashboard_apps_permissions_title}" + app:subTitle='@{@string/dashboard_apps_permissions_subtitle}' + /> + <View + android:layout_width="match_parent" + android:layout_height="1dp" + android:layout_marginStart="72dp" + android:background="@color/grey_divider" + /> - </LinearLayout> + <include + layout="@layout/dashboard_item_submenu_button" + android:id="@+id/my_location" + android:layout_width="match_parent" + android:layout_height="wrap_content" + app:icon="@{@drawable/ic_my_location}" + app:title="@{@string/dashboard_location_title}" + app:subTitle='@{@string/dashboard_location_subtitle_off}' + /> + <View + android:layout_width="match_parent" + android:layout_height="1dp" + android:layout_marginStart="72dp" + android:background="@color/grey_divider" + /> + <include + layout="@layout/dashboard_item_submenu_button" + android:id="@+id/internet_activity_privacy" + android:layout_width="match_parent" + android:layout_height="wrap_content" + app:icon="@{@drawable/ic_internet_activity}" + app:title="@{@string/dashboard_internet_activity_privacy_title}" + app:subTitle='@{@string/dashboard_internet_activity_privacy_subtitle_off}' + /> + <View + android:layout_width="match_parent" + android:layout_height="1dp" + android:layout_marginStart="72dp" + android:background="@color/grey_divider" + /> </LinearLayout> </androidx.core.widget.NestedScrollView> -</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file +</androidx.coordinatorlayout.widget.CoordinatorLayout> +</layout>
\ No newline at end of file |