summaryrefslogtreecommitdiff
path: root/app/src/main/res/layout
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2021-10-22 23:36:34 +0200
committercyBerta <cyberta@riseup.net>2021-10-22 23:36:34 +0200
commit213e42d82d360cdf7f5632782a9a0cb879c1b4f5 (patch)
treed5f5e98bb2f5294b2fe260719c8b148a344f3bd8 /app/src/main/res/layout
parent726f06f564e2743048baea5624daa96a511aace3 (diff)
show tor and snowflake connection status in provider setup screens
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r--app/src/main/res/layout/v_add_provider.xml57
-rw-r--r--app/src/main/res/layout/v_loading_screen.xml139
-rw-r--r--app/src/main/res/layout/v_log_item.xml16
3 files changed, 154 insertions, 58 deletions
diff --git a/app/src/main/res/layout/v_add_provider.xml b/app/src/main/res/layout/v_add_provider.xml
deleted file mode 100644
index 933f19d0..00000000
--- a/app/src/main/res/layout/v_add_provider.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout 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:id="@+id/loading_screen"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical"
- android:visibility="gone"
- tools:visibility="visible">
-
- <androidx.appcompat.widget.AppCompatImageView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:adjustViewBounds="true"
- app:tint="@color/colorPrimary"
- app:srcCompat="@drawable/action_history"
- android:layout_marginTop="@dimen/loading_screen_icon_vertical_margin"
- android:layout_marginBottom="@dimen/loading_screen_icon_vertical_margin"
- />
-
- <androidx.appcompat.widget.AppCompatTextView
- android:id="@+id/progressbar_title"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:fadingEdge="horizontal"
- android:singleLine="true"
- android:text="@string/introduce_new_provider"
- android:textAppearance="@style/Base.TextAppearance.AppCompat.Medium"
- android:layout_marginTop="@dimen/standard_margin"
- android:layout_marginBottom="@dimen/standard_margin"
- />
-
- <androidx.appcompat.widget.AppCompatTextView
- android:id="@+id/progressbar_description"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:fadingEdge="horizontal"
- android:maxLines="2"
- android:text="@string/configuring_provider"
- android:textAppearance="@style/Base.TextAppearance.AppCompat.Small"
- android:layout_marginTop="@dimen/standard_margin"
- android:layout_marginBottom="@dimen/standard_margin"
- tools:text="test"
- tools:visibility="visible"
- />
-
- <ProgressBar
- android:id="@+id/progressbar"
- style="@style/Widget.AppCompat.ProgressBar.Horizontal"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:indeterminate="true"
- android:layout_marginTop="@dimen/standard_margin"
- />
-
-</LinearLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/v_loading_screen.xml b/app/src/main/res/layout/v_loading_screen.xml
index f7f58e7b..9942a1c5 100644
--- a/app/src/main/res/layout/v_loading_screen.xml
+++ b/app/src/main/res/layout/v_loading_screen.xml
@@ -30,7 +30,6 @@
android:textAppearance="@style/Base.TextAppearance.AppCompat.Medium"
android:layout_marginTop="@dimen/standard_margin"
android:layout_marginBottom="@dimen/standard_margin"
- tools:text="title"
/>
<androidx.appcompat.widget.AppCompatTextView
@@ -56,4 +55,142 @@
android:layout_marginTop="@dimen/standard_margin"
/>
+ <RelativeLayout
+ android:id="@+id/connection_detail_container"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="30dp"
+ android:visibility="gone"
+ tools:visibility="visible"
+ >
+ <androidx.appcompat.widget.AppCompatTextView
+ android:id="@+id/connection_details_title"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/show_log"
+ android:gravity="start"
+ android:textAppearance="@style/Base.TextAppearance.AppCompat.Medium"
+ android:paddingBottom="@dimen/stdpadding"
+ android:paddingStart="4dp"
+ android:paddingLeft="4dp"
+ android:paddingEnd="4dp"
+ android:paddingRight="4dp"
+ />
+
+ <androidx.appcompat.widget.AppCompatImageView
+ android:id="@+id/tor_icon"
+ android:layout_width="35dp"
+ android:layout_height="35dp"
+ android:src="@drawable/ic_tor"
+ android:layout_below="@id/connection_details_title"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentStart="true"
+ android:layout_marginBottom="@dimen/stdpadding"
+ />
+ <androidx.appcompat.widget.AppCompatTextView
+ android:id="@+id/tor_state"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/connection_details_title"
+ android:fadingEdge="horizontal"
+ android:maxLines="2"
+ android:text="@string/configuring_provider"
+ android:textAppearance="@style/Base.TextAppearance.AppCompat.Small"
+ android:layout_alignBottom="@id/tor_icon"
+ android:layout_toEndOf="@id/tor_icon"
+ android:layout_toRightOf="@+id/tor_icon"
+ android:layout_alignParentRight="true"
+ android:layout_alignParentEnd="true"
+ android:gravity="bottom"
+ tools:text="test 12321 123 \n sdf,sdf,m\nn 123 "
+ android:ellipsize="end"
+
+ tools:visibility="visible"
+ />
+
+ <androidx.appcompat.widget.AppCompatImageView
+ android:id="@+id/snowflake_icon"
+ android:layout_width="35dp"
+ android:layout_height="35dp"
+ android:src="@drawable/ic_snowflake"
+ android:layout_below="@id/tor_icon"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentStart="true"
+ android:layout_marginBottom="@dimen/stdpadding"
+ />
+ <androidx.appcompat.widget.AppCompatTextView
+ android:id="@+id/snowflake_state"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/tor_state"
+ android:fadingEdge="horizontal"
+ android:maxLines="2"
+ android:text="@string/configuring_provider"
+ android:textAppearance="@style/Base.TextAppearance.AppCompat.Small"
+ android:layout_alignTop="@id/snowflake_icon"
+ android:layout_alignBottom="@+id/snowflake_icon"
+ android:layout_toEndOf="@+id/snowflake_icon"
+ android:layout_toRightOf="@+id/snowflake_icon"
+ android:layout_alignParentEnd="true"
+ android:layout_alignParentRight="true"
+ android:paddingBottom="1dp"
+ android:gravity="bottom"
+ tools:text="test \n another \n and a third \n blkud"
+ android:ellipsize="end"
+ tools:visibility="visible"
+ />
+ <Button
+ android:id="@+id/btn_connection_detail"
+ android:layout_marginTop="30dp"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentEnd="true"
+ android:layout_alignParentRight="true"
+ android:layout_below="@id/snowflake_icon"
+ android:text="@string/show_log"
+ android:visibility="visible"
+ />
+ </RelativeLayout>
+ <RelativeLayout
+ android:id="@+id/log_container"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:visibility="gone"
+ tools:visibility="visible"
+ >
+ <androidx.appcompat.widget.AppCompatTextView
+ android:id="@+id/connection_detail_logs_title"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/log_fragment_title"
+ android:textAppearance="@style/Base.TextAppearance.AppCompat.Medium"
+ android:layout_alignParentTop="true"
+ android:paddingStart="4dp"
+ android:paddingLeft="4dp"
+ android:paddingEnd="4dp"
+ android:paddingRight="4dp"
+ android:paddingTop="@dimen/stdpadding"
+ android:paddingBottom="@dimen/stdpadding"
+ />
+
+ <androidx.recyclerview.widget.RecyclerView
+ android:id="@+id/connection_detail_logs"
+ android:layout_below="@+id/connection_detail_logs_title"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ tools:listitem="@layout/v_log_item"
+ android:isScrollContainer="false"
+ />
+
+ <ImageView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_alignBottom="@+id/connection_detail_logs"
+ android:layout_alignTop="@id/connection_detail_logs"
+ android:src="@drawable/v_vertical_gradient"
+ android:layout_marginTop="200dp"
+ android:importantForAccessibility="no"
+ />
+ </RelativeLayout>
+
</LinearLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/v_log_item.xml b/app/src/main/res/layout/v_log_item.xml
new file mode 100644
index 00000000..c3039f46
--- /dev/null
+++ b/app/src/main/res/layout/v_log_item.xml
@@ -0,0 +1,16 @@
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:id="@android:id/text1"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:textAppearance="@style/Base.TextAppearance.AppCompat.Small"
+ android:gravity="center_vertical"
+ tools:text="test \ntest2\ntest3"
+ android:paddingStart="?android:attr/listPreferredItemPaddingStart"
+ android:paddingLeft="?android:attr/listPreferredItemPaddingLeft"
+ android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
+ android:paddingRight="?android:attr/listPreferredItemPaddingRight"
+ android:background="?android:attr/activatedBackgroundIndicator"
+ android:paddingTop="2dp"
+ android:paddingBottom="2dp"
+ /> \ No newline at end of file