Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Commit

Permalink
Optimize Config Layout
Browse files Browse the repository at this point in the history
  • Loading branch information
AnGgIt86 committed Sep 28, 2024
1 parent 2cfe7a9 commit 00768b9
Show file tree
Hide file tree
Showing 9 changed files with 152 additions and 604 deletions.
130 changes: 3 additions & 127 deletions app/src/main/res/layout/activity_server_shadowsocks.xml
Original file line number Diff line number Diff line change
Expand Up @@ -275,54 +275,7 @@
android:paddingEnd="16.0dip"
android:layout_marginStart="16.0dip"
android:layout_marginEnd="16.0dip">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16.0dip"
android:layout_marginBottom="8.0dip">
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/server_lab_remarks"
style="@style/Outline_TextInputLayout">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/et_remarks"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="text" />
</com.google.android.material.textfield.TextInputLayout>
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8.0dip"
android:layout_marginBottom="8.0dip">
<com.google.android.material.textfield.TextInputLayout
android:layout_width="200.0dip"
android:layout_height="wrap_content"
android:layout_marginRight="10.0dip"
android:hint="@string/server_lab_address3"
style="@style/Outline_TextInputLayout">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/et_address"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="text" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/server_lab_port3"
style="@style/Outline_TextInputLayout">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/et_port"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="number" />
</com.google.android.material.textfield.TextInputLayout>
</LinearLayout>
<include layout="@layout/layout_address_port" />
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
Expand Down Expand Up @@ -361,85 +314,8 @@
android:layout_height="@dimen/edit_height"
android:foreground="?android:selectableItemBackground" />
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8.0dip"
android:layout_marginBottom="8.0dip">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/server_lab_network" />
<Spinner
android:entries="@array/networks"
android:id="@+id/sp_network"
android:background="@drawable/uwu_bg_spinner"
android:focusable="true"
android:clickable="true"
android:layout_width="match_parent"
android:layout_height="@dimen/edit_height"
android:foreground="?android:selectableItemBackground" />
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8.0dip"
android:layout_marginBottom="8.0dip">
<TextView
android:id="@+id/sp_header_type_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/server_lab_head_type" />
<Spinner
android:id="@+id/sp_header_type"
android:background="@drawable/uwu_bg_spinner"
android:focusable="true"
android:clickable="true"
android:layout_width="match_parent"
android:layout_height="@dimen/edit_height"
android:foreground="?android:selectableItemBackground" />
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8.0dip"
android:layout_marginBottom="8.0dip">
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/tv_request_host"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/server_lab_request_host"
style="@style/Outline_TextInputLayout">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/et_request_host"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="text" />
</com.google.android.material.textfield.TextInputLayout>
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8.0dip"
android:layout_marginBottom="8.0dip">
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/tv_path"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/server_lab_path"
style="@style/Outline_TextInputLayout">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/et_path"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="text" />
</com.google.android.material.textfield.TextInputLayout>
</LinearLayout>
<include layout="@layout/tls_layout" />
<include layout="@layout/layout_transport" />
<include layout="@layout/layout_tls" />
</LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
Expand Down
49 changes: 1 addition & 48 deletions app/src/main/res/layout/activity_server_socks.xml
Original file line number Diff line number Diff line change
Expand Up @@ -275,54 +275,7 @@
android:paddingEnd="16.0dip"
android:layout_marginStart="16.0dip"
android:layout_marginEnd="16.0dip">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16.0dip"
android:layout_marginBottom="8.0dip">
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/server_lab_remarks"
style="@style/Outline_TextInputLayout">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/et_remarks"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="text" />
</com.google.android.material.textfield.TextInputLayout>
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8.0dip"
android:layout_marginBottom="8.0dip">
<com.google.android.material.textfield.TextInputLayout
android:layout_width="200.0dip"
android:layout_height="wrap_content"
android:layout_marginRight="10.0dip"
android:hint="@string/server_lab_address3"
style="@style/Outline_TextInputLayout">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/et_address"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="text" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/server_lab_port3"
style="@style/Outline_TextInputLayout">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/et_port"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="number" />
</com.google.android.material.textfield.TextInputLayout>
</LinearLayout>
<include layout="@layout/layout_address_port" />
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
Expand Down
Loading

0 comments on commit 00768b9

Please sign in to comment.