summaryrefslogtreecommitdiff
path: root/app/src/main/res/layout
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2019-10-01 00:25:54 +0200
committercyBerta <cyberta@riseup.net>2019-10-01 00:25:54 +0200
commitfca6c9dcff1b5b5400a61b7411a7f72460fbfbfa (patch)
treec8efd8b964d495467619000fa7435c2a5527efa1 /app/src/main/res/layout
parent7820e8c0819a10c5b4729678607681fcfe30cbae (diff)
parent685da193ea29f3e7a8a42d55747dfb2f956f23b6 (diff)
Merge branch 'pluggableTransports2'
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r--app/src/main/res/layout/f_drawer_main.xml156
-rw-r--r--app/src/main/res/layout/v_icon_text_list_item.xml33
-rw-r--r--app/src/main/res/layout/v_switch_list_item.xml26
3 files changed, 166 insertions, 49 deletions
diff --git a/app/src/main/res/layout/f_drawer_main.xml b/app/src/main/res/layout/f_drawer_main.xml
index b04d7b87..f6c9b2bb 100644
--- a/app/src/main/res/layout/f_drawer_main.xml
+++ b/app/src/main/res/layout/f_drawer_main.xml
@@ -1,70 +1,134 @@
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<ScrollView 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_width="match_parent"
android:layout_height="match_parent"
- android:orientation="vertical"
+ android:layout_width="match_parent"
android:background="@color/colorBackground"
tools:context="se.leap.bitmaskclient.drawer.NavigationDrawerFragment"
android:clickable="true"
- android:focusable="true">
+ android:focusable="true"
+ android:fillViewport="true"
+ >
- <FrameLayout
+ <LinearLayout
android:layout_width="match_parent"
- android:layout_height="150dp">
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ >
- <android.support.v7.widget.AppCompatImageView
- android:id="@+id/background"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:adjustViewBounds="false"
- android:cropToPadding="false"
- android:scaleType="fitXY"
- app:srcCompat="@drawable/background_drawer" />
-
- <android.support.v7.widget.AppCompatImageView
- android:id="@+id/foreground"
+ <FrameLayout
android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:scaleType="centerInside"
- app:srcCompat="@drawable/drawer_logo" />
- </FrameLayout>
- <RelativeLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical">
+ android:layout_height="150dp">
- <ListView
- android:id="@+id/accountList"
- android:layout_width="match_parent"
+ <android.support.v7.widget.AppCompatImageView
+ android:id="@+id/background"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:adjustViewBounds="false"
+ android:cropToPadding="false"
+ android:scaleType="fitXY"
+ app:srcCompat="@drawable/background_drawer" />
+
+ <android.support.v7.widget.AppCompatImageView
+ android:id="@+id/foreground"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:scaleType="centerInside"
+ app:srcCompat="@drawable/drawer_logo" />
+ </FrameLayout>
+
+ <se.leap.bitmaskclient.views.IconTextEntry
+ android:id="@+id/account"
android:layout_height="wrap_content"
- android:isScrollContainer="false"
+ android:layout_width="wrap_content"
+ />
+
+ <se.leap.bitmaskclient.views.IconTextEntry
+ android:id="@+id/switch_provider"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ app:text="@string/switch_provider_menu_option"
+ app:icon="@drawable/ic_switch_provider_36"
+ android:visibility="gone"
/>
<View
- android:id="@+id/divider"
- android:layout_below="@id/accountList"
android:layout_width="match_parent"
- android:layout_height="1px"
- android:background="@android:color/darker_gray"
+ android:layout_height="0dp"
+ android:layout_weight="1"
+ android:minHeight="20dp"
+ android:background="@color/black800_high_transparent"
/>
- <FrameLayout
+ <se.leap.bitmaskclient.views.IconSwitchEntry
+ android:id="@+id/battery_switch"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ app:text="@string/save_battery"
+ app:icon="@drawable/ic_battery_36"
+ />
+
+ <se.leap.bitmaskclient.views.IconSwitchEntry
+ android:id="@+id/bridges_switch"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ app:text="@string/nav_drawer_obfuscated_connection"
+ app:subtitle="@string/nav_drawer_subtitle_obfuscated_connection"
+ app:icon="@drawable/ic_bridge_36"
+ android:visibility="gone"
+ />
+
+ <se.leap.bitmaskclient.views.IconTextEntry
+ android:id="@+id/always_on_vpn"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ app:text="@string/always_on_vpn"
+ app:subtitle="@string/subtitle_always_on_vpn"
+ app:icon="@drawable/ic_always_on_36"
+ android:visibility="gone"
+ />
+
+ <se.leap.bitmaskclient.views.IconTextEntry
+ android:id="@+id/exclude_apps"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ app:text="@string/exclude_apps_fragment_title"
+ app:icon="@drawable/ic_shield_remove_grey600_36dp"
+ android:visibility="gone"
+ />
+
+ <View
android:layout_width="match_parent"
+ android:layout_height="20dp"
+ android:background="@color/black800_high_transparent"
+ />
+
+ <se.leap.bitmaskclient.views.IconTextEntry
+ android:id="@+id/donate"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_alignTop="@id/divider"
- android:layout_alignParentBottom="true"
- >
- <ListView
- android:id="@+id/settingsList"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="bottom"
- />
- </FrameLayout>
+ app:text="@string/donate_title"
+ app:icon="@drawable/ic_donate_36"
+ android:visibility="gone"
+ />
+ <se.leap.bitmaskclient.views.IconTextEntry
+ android:id="@+id/log"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ app:text="@string/log_fragment_title"
+ app:icon="@drawable/ic_log_36"
+ />
+
+ <se.leap.bitmaskclient.views.IconTextEntry
+ android:id="@+id/about"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ app:text="@string/about_fragment_title"
+ app:icon="@drawable/ic_about_36"
+ />
- </RelativeLayout>
+ </LinearLayout>
-</LinearLayout> \ No newline at end of file
+</ScrollView>
diff --git a/app/src/main/res/layout/v_icon_text_list_item.xml b/app/src/main/res/layout/v_icon_text_list_item.xml
index 0631b2fc..64cc474a 100644
--- a/app/src/main/res/layout/v_icon_text_list_item.xml
+++ b/app/src/main/res/layout/v_icon_text_list_item.xml
@@ -1,6 +1,6 @@
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/item_container"
- android:layout_height="wrap_content"
+ android:layout_height="?android:attr/listPreferredItemHeightSmall"
android:layout_width="match_parent"
android:orientation="horizontal"
xmlns:tools="http://schemas.android.com/tools">
@@ -26,6 +26,33 @@
android:paddingRight="?android:attr/listPreferredItemPaddingRight"
android:minHeight="?android:attr/listPreferredItemHeightSmall"
tools:text="TEST"
+ android:layout_toEndOf="@id/material_icon"
+ android:layout_toRightOf="@+id/material_icon"
+ android:layout_above="@+id/subtitle"
/>
-</LinearLayout>
+ <TextView
+ android:id="@+id/subtitle"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center_vertical"
+ android:layout_alignParentBottom="true"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:paddingStart="?android:attr/listPreferredItemPaddingStart"
+ android:paddingLeft="?android:attr/listPreferredItemPaddingLeft"
+ android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
+ android:paddingRight="?android:attr/listPreferredItemPaddingRight"
+ android:paddingBottom="4dp"
+ tools:text="TEST"
+ android:visibility="gone"
+ android:layout_toEndOf="@id/material_icon"
+ android:layout_toRightOf="@+id/material_icon"
+ />
+
+ <View
+ android:layout_width="match_parent"
+ android:layout_height="1px"
+ android:background="@android:color/darker_gray"
+ android:layout_alignParentBottom="true"
+ />
+</RelativeLayout>
diff --git a/app/src/main/res/layout/v_switch_list_item.xml b/app/src/main/res/layout/v_switch_list_item.xml
index 26060a73..967d7a97 100644
--- a/app/src/main/res/layout/v_switch_list_item.xml
+++ b/app/src/main/res/layout/v_switch_list_item.xml
@@ -29,6 +29,25 @@
tools:text="TEST"
android:layout_toEndOf="@id/material_icon"
android:layout_toRightOf="@+id/material_icon"
+ android:layout_above="@+id/subtitle"
+ />
+
+ <TextView
+ android:id="@+id/subtitle"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:gravity="center_vertical"
+ android:layout_alignParentBottom="true"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:paddingStart="?android:attr/listPreferredItemPaddingStart"
+ android:paddingLeft="?android:attr/listPreferredItemPaddingLeft"
+ android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
+ android:paddingRight="?android:attr/listPreferredItemPaddingRight"
+ android:paddingBottom="4dp"
+ tools:text="TEST"
+ android:visibility="gone"
+ android:layout_toEndOf="@id/material_icon"
+ android:layout_toRightOf="@+id/material_icon"
/>
<android.support.v7.widget.SwitchCompat
@@ -45,4 +64,11 @@
android:minHeight="?android:attr/listPreferredItemHeightSmall"
android:checked="false"
tools:text="" />
+
+ <View
+ android:layout_width="match_parent"
+ android:layout_height="1px"
+ android:background="@android:color/darker_gray"
+ android:layout_alignParentBottom="true"
+ />
</RelativeLayout> \ No newline at end of file