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

Commit

Permalink
Little update and Bringback UWU UI
Browse files Browse the repository at this point in the history
  • Loading branch information
AnGgIt86 committed Sep 30, 2024
1 parent adcf9c5 commit eff0ca8
Show file tree
Hide file tree
Showing 11 changed files with 233 additions and 177 deletions.
10 changes: 4 additions & 6 deletions app/src/main/res/drawable/ic_lock_24dp.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="1024"
android:viewportHeight="1024">

android:viewportHeight="24"
android:viewportWidth="24">
<path
android:fillColor="#FF000000"
android:pathData="M742.4,409.6L716.8,409.6L716.8,332.8C716.8,205.8 613.4,102.4 486.4,102.4S256,205.8 256,332.8L256,409.6h-25.6C188.1,409.6 153.6,444.1 153.6,486.4v409.6c0,42.3 34.5,76.8 76.8,76.8h512c42.3,0 76.8,-34.5 76.8,-76.8v-409.6c0,-42.3 -34.5,-76.8 -76.8,-76.8zM307.2,332.8C307.2,234 387.6,153.6 486.4,153.6S665.6,234 665.6,332.8L665.6,409.6L307.2,409.6L307.2,332.8zM768,896a25.6,25.6 0,0 1,-25.6 25.6h-512a25.6,25.6 0,0 1,-25.6 -25.6v-409.6a25.6,25.6 0,0 1,25.6 -25.6h512a25.6,25.6 0,0 1,25.6 25.6v409.6z" />

android:fillColor="#ff000000"
android:pathData="M12,17C10.89,17 10,16.1 10,15C10,13.89 10.89,13 12,13A2,2 0,0 1,14 15A2,2 0,0 1,12 17M18,20V10H6V20H18M18,8A2,2 0,0 1,20 10V20A2,2 0,0 1,18 22H6C4.89,22 4,21.1 4,20V10C4,8.89 4.89,8 6,8H7V6A5,5 0,0 1,12 1A5,5 0,0 1,17 6V8H18M12,3A3,3 0,0 0,9 6V8H15V6A3,3 0,0 0,12 3Z" />
</vector>
36 changes: 21 additions & 15 deletions app/src/main/res/layout/activity_routing_edit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -276,11 +276,23 @@
android:layout_marginStart="16.0dip"
android:layout_marginEnd="16.0dip">
<LinearLayout
android:orientation="vertical"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16.0dip"
android:layout_marginBottom="8.0dip">
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/chk_locked"
android:text="@string/routing_settings_locked"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</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:layout_width="match_parent"
android:layout_height="wrap_content"
Expand All @@ -295,18 +307,6 @@
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.materialswitch.MaterialSwitch
android:id="@+id/chk_locked"
android:text="@string/routing_settings_locked"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
Expand Down Expand Up @@ -334,9 +334,8 @@
android:layout_marginTop="8.0dip"
android:layout_marginBottom="8.0dip">
<com.google.android.material.textfield.TextInputLayout
android:layout_width="200.0dip"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="10.0dip"
android:hint="@string/routing_settings_ip"
app:expandedHintEnabled="false"
style="@style/Outline_TextInputLayout">
Expand All @@ -347,6 +346,13 @@
android:hint="@string/routing_settings_tips"
android:inputType="textMultiLine" />
</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="match_parent"
android:layout_height="wrap_content"
Expand Down
224 changes: 138 additions & 86 deletions app/src/main/res/layout/item_recycler_routing_setting.xml
Original file line number Diff line number Diff line change
@@ -1,112 +1,164 @@
<?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"
<LinearLayout
android:gravity="center_vertical"
android:id="@+id/item_bg"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16.0dip"
android:layout_marginTop="4.0dip"
android:layout_marginTop="8.0dip"
android:layout_marginRight="16.0dip"
android:layout_marginBottom="4.0dip">
android:layout_marginBottom="8.0dip"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<androidx.cardview.widget.CardView
android:orientation="horizontal"
android:id="@+id/item_cardview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/cardview_margin"
app:cardBackgroundColor="@color/uwu_bg_card"
app:cardCornerRadius="24.0dip"
app:cardElevation="0.0dip">
<LinearLayout
android:gravity="center"
android:layout_gravity="center"
android:orientation="horizontal"
android:id="@+id/info_container"
android:background="?attr/selectableItemBackground"
android:focusable="true"
android:nextFocusRight="@+id/layout_edit"
android:clickable="true"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:foreground="?android:selectableItemBackground">
<LinearLayout
android:orientation="vertical"
android:layout_width="0.0dip"
android:layout_height="wrap_content"
android:layout_weight="1.0"
android:paddingStart="@dimen/padding_start">
android:orientation="horizontal"
android:id="@+id/layout_indicator"
android:background="@color/uwu_transparent"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10.0dip"
android:orientation="horizontal">
<TextView
android:id="@+id/remarks"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead" />
<ImageView
android:id="@+id/img_locked"
android:layout_gravity="center"
android:layout_marginStart="@dimen/padding_start"
android:layout_width="16dp"
android:layout_height="16dp"
app:srcCompat="@drawable/ic_lock_24dp" />
</LinearLayout>
<TextView
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:id="@+id/domainIp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10.0dip"
android:lines="1" />
<TextView
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:id="@+id/outboundTag"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10.0dip"
android:layout_marginBottom="10.0dip"
android:lines="1" />
</LinearLayout>
<LinearLayout
android:gravity="center"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="@dimen/sub_height"
android:paddingStart="@dimen/padding_start"
android:paddingEnd="@dimen/padding_end">
<LinearLayout
android:gravity="center"
android:orientation="vertical"
android:id="@+id/layout_edit"
android:background="?attr/selectableItemBackgroundBorderless"
android:padding="@dimen/layout_margin_spacing"
android:focusable="true"
android:nextFocusLeft="@+id/info_container"
android:clickable="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:layout_width="@dimen/png_height"
android:layout_height="@dimen/png_height"
app:srcCompat="@drawable/ic_edit_24dp"
app:tint="?android:textColorPrimary" />
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/padding_start">
<com.neko.switchbutton.SwitchButton
android:gravity="center"
android:layout_gravity="center"
android:id="@+id/chk_enable"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:kswAnimationDuration="300"
app:kswBackDrawable="@drawable/uwu_switch_track"
app:kswThumbDrawable="@drawable/uwu_switch_thumb" />
android:nextFocusRight="@+id/layout_edit"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:orientation="horizontal"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:gravity="center_vertical"
android:layout_gravity="center_vertical"
android:paddingLeft="12.0dip"
android:paddingTop="8.0dip"
android:paddingRight="0.0dip"
android:paddingBottom="4.0dip"
android:layout_width="0.0dip"
android:layout_height="wrap_content"
android:layout_weight="1.0">
<TextView
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
android:textSize="17.0sp"
android:textColor="?android:textColorPrimary"
android:id="@+id/remarks"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="2"
android:minLines="1" />
<ImageView
android:id="@+id/img_locked"
android:paddingLeft="12.0dip"
android:layout_width="28.0dip"
android:layout_height="28.0dip"
android:src="@drawable/ic_lock_24dp"
app:tint="?android:textColorSecondary" />
</LinearLayout>
<LinearLayout
android:gravity="center"
android:orientation="vertical"
android:id="@+id/layout_edit"
android:background="?attr/selectableItemBackgroundBorderless"
android:paddingLeft="0.0dip"
android:paddingTop="8.0dip"
android:paddingRight="12.0dip"
android:paddingBottom="4.0dip"
android:focusable="true"
android:clickable="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:layout_width="@dimen/png_height"
android:layout_height="@dimen/png_height"
android:src="@drawable/ic_edit_24dp"
app:tint="?android:textColorPrimary" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:id="@+id/contener"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:gravity="center_vertical"
android:layout_gravity="center_vertical"
android:paddingLeft="12.0dip"
android:paddingTop="4.0dip"
android:paddingRight="0.0dip"
android:paddingBottom="4.0dip"
android:layout_width="0.0dip"
android:layout_height="wrap_content"
android:layout_weight="1.0">
<TextView
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textSize="14.0sp"
android:textColor="?android:textColorSecondary"
android:id="@+id/domainIp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:minLines="1" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:id="@+id/contleler"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:gravity="center_vertical"
android:layout_gravity="center_vertical"
android:paddingLeft="12.0dip"
android:paddingTop="4.0dip"
android:paddingRight="0.0dip"
android:paddingBottom="8.0dip"
android:layout_width="0.0dip"
android:layout_height="wrap_content"
android:layout_weight="1.0">
<TextView
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textSize="14.0sp"
android:textColor="?attr/colorThemeUwu"
android:id="@+id/outboundTag"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:minLines="1" />
</LinearLayout>
<LinearLayout
android:gravity="center"
android:orientation="vertical"
android:paddingLeft="0.0dip"
android:paddingTop="4.0dip"
android:paddingRight="12.0dip"
android:paddingBottom="8.0dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<com.neko.switchbutton.SwitchButton
android:gravity="center"
android:layout_gravity="center"
android:id="@+id/chk_enable"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:kswAnimationDuration="300"
app:kswBackDrawable="@drawable/uwu_switch_track"
app:kswThumbDrawable="@drawable/uwu_switch_thumb" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
Expand Down
Loading

0 comments on commit eff0ca8

Please sign in to comment.