Add transports activity.

This commit is contained in:
akwizgran
2020-04-23 16:19:33 +01:00
parent c75c8da4b9
commit 73c6a29ede
9 changed files with 640 additions and 98 deletions

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<GridView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/grid"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:numColumns="1"
android:padding="6dp"
android:verticalSpacing="12dp"
tools:listitem="@layout/list_item_transport_card" />

View File

@@ -0,0 +1,73 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:orientation="horizontal">
<ImageView
android:id="@+id/icon"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_gravity="center"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"
tools:background="@drawable/transport_tor"
tools:ignore="ContentDescription" />
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="?android:attr/textColorPrimary"
tools:text="@string/transport_tor" />
</LinearLayout>
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/switchCompat"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
tools:checked="true"
tools:text="@string/tor_enable_title" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/status_heading"
android:textColor="?android:attr/textColorPrimary" />
<TextView
android:id="@+id/deviceStatus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:layout_marginLeft="4dp"
android:textColor="?android:attr/textColorPrimary"
tools:text="@string/tor_device_status_online_wifi" />
<TextView
android:id="@+id/appStatus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:layout_marginLeft="4dp"
android:textColor="?android:attr/textColorPrimary"
tools:text="@string/tor_plugin_status_active" />
</LinearLayout>
</androidx.cardview.widget.CardView>

View File

@@ -12,7 +12,6 @@
android:id="@+id/transportsView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:listSelector="@android:color/transparent"
android:numColumns="3"
tools:listitem="@layout/list_item_transport" />