Skip to content
This repository was archived by the owner on Dec 18, 2022. It is now read-only.

Commit 7d11a77

Browse files
committed
build initial layout for user to select isolation flags
1 parent a88a81e commit 7d11a77

File tree

3 files changed

+78
-0
lines changed

3 files changed

+78
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<shape xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:shape="rectangle">
4+
<solid android:color="@color/tor_service_white" />
5+
<corners android:radius="16dp" />
6+
<stroke android:width="4dp" android:color="@color/secondaryColor" />
7+
</shape>
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
xmlns:app="http://schemas.android.com/apk/res-auto"
3+
xmlns:tools="http://schemas.android.com/tools"
4+
android:layout_width="match_parent"
5+
android:layout_height="match_parent"
6+
tools:context="io.matthewnelson.sampleapp.ui.fragments.settings.tor.IsolationFlagsFragment">
7+
8+
<LinearLayout
9+
android:id="@+id/isolation_flags_space_top"
10+
android:layout_width="0dp"
11+
android:layout_height="0dp"
12+
android:orientation="horizontal"
13+
app:layout_constraintBottom_toTopOf="@+id/isolation_flags_layout_constraint_inner"
14+
app:layout_constraintEnd_toEndOf="parent"
15+
app:layout_constraintStart_toStartOf="parent"
16+
app:layout_constraintTop_toTopOf="parent" />
17+
18+
<LinearLayout
19+
android:id="@+id/isolation_flags_layout_bottom"
20+
android:layout_width="0dp"
21+
android:layout_height="0dp"
22+
android:orientation="horizontal"
23+
app:layout_constraintBottom_toBottomOf="parent"
24+
app:layout_constraintEnd_toEndOf="parent"
25+
app:layout_constraintStart_toStartOf="parent"
26+
app:layout_constraintTop_toBottomOf="@id/isolation_flags_layout_constraint_inner" />
27+
28+
<LinearLayout
29+
android:id="@+id/isolation_flags_layout_end"
30+
android:layout_width="0dp"
31+
android:layout_height="0dp"
32+
android:orientation="horizontal"
33+
app:layout_constraintBottom_toTopOf="@+id/isolation_flags_layout_bottom"
34+
app:layout_constraintEnd_toEndOf="parent"
35+
app:layout_constraintStart_toEndOf="@id/isolation_flags_layout_constraint_inner"
36+
app:layout_constraintTop_toBottomOf="@id/isolation_flags_space_top" />
37+
38+
<LinearLayout
39+
android:id="@+id/isolation_flags_layout_start"
40+
android:layout_width="0dp"
41+
android:layout_height="0dp"
42+
android:orientation="horizontal"
43+
app:layout_constraintBottom_toTopOf="@+id/isolation_flags_layout_bottom"
44+
app:layout_constraintEnd_toStartOf="@+id/isolation_flags_layout_constraint_inner"
45+
app:layout_constraintStart_toStartOf="parent"
46+
app:layout_constraintTop_toBottomOf="@+id/isolation_flags_space_top" />
47+
48+
<androidx.constraintlayout.widget.ConstraintLayout
49+
android:id="@+id/isolation_flags_layout_constraint_inner"
50+
android:layout_width="0dp"
51+
android:layout_height="0dp"
52+
android:layout_marginStart="60dp"
53+
android:layout_marginTop="60dp"
54+
android:layout_marginEnd="60dp"
55+
android:layout_marginBottom="60dp"
56+
android:background="@drawable/isolation_flag_fragment_background"
57+
app:layout_constraintBottom_toBottomOf="parent"
58+
app:layout_constraintEnd_toEndOf="parent"
59+
app:layout_constraintStart_toStartOf="parent"
60+
app:layout_constraintTop_toTopOf="parent">
61+
62+
</androidx.constraintlayout.widget.ConstraintLayout>
63+
64+
65+
</androidx.constraintlayout.widget.ConstraintLayout>

sampleapp/src/main/res/values/strings.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,16 @@
7373
<string name="settings_tor_edit_text_hint_port_custom">1024 to 65535</string>
7474
<string name="settings_tor_text_view_socks_port">Socks Port:</string>
7575
<string name="settings_tor_text_view_socks_port_custom">Custom (eg. 9050):</string>
76+
<string name="settings_tor_button_socks_isolation_flags">Socks Isolation Flags</string>
7677
<string name="settings_tor_text_view_http_port">HTTP Port:</string>
7778
<string name="settings_tor_text_view_http_port_custom">Custom (eg. 8118):</string>
79+
<string name="settings_tor_button_http_isolation_flags">HTTP Isolation Flags</string>
7880
<string name="settings_tor_text_view_dns_port">DNS Port:</string>
7981
<string name="settings_tor_text_view_dns_port_custom">Custom (eg. 5400):</string>
82+
<string name="settings_tor_button_dns_isolation_flags">DNS Isolation Flags</string>
8083
<string name="settings_tor_text_view_trans_port">Trans Port:</string>
8184
<string name="settings_tor_text_view_trans_port_custom">Custom (eg. 9040):</string>
85+
<string name="settings_tor_button_trans_isolation_flags">Trans Isolation Flags</string>
86+
87+
<!-- IsolationFlagsFragment -->
8288
</resources>

0 commit comments

Comments
 (0)