This commit is contained in:
tom5079
2024-04-11 07:53:38 -07:00
parent a5d4cbfaec
commit 03b88c5b4b
26 changed files with 956 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M4.5,10.5 L12,3m0,0 l7.5,7.5M12,3v18"
android:strokeLineJoin="round"
android:strokeWidth="1.5"
android:fillColor="#00000000"
android:strokeColor="@color/colorPrimaryDark"
android:strokeLineCap="round"/>
</vector>

View File

@@ -0,0 +1,13 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M13.19,8.688a4.5,4.5 0,0 1,1.242 7.244l-4.5,4.5a4.5,4.5 0,0 1,-6.364 -6.364l1.757,-1.757m13.35,-0.622 l1.757,-1.757a4.5,4.5 0,0 0,-6.364 -6.364l-4.5,4.5a4.5,4.5 0,0 0,1.242 7.244"
android:strokeLineJoin="round"
android:strokeWidth="1.5"
android:fillColor="#00000000"
android:strokeColor="@color/colorPrimaryDark"
android:strokeLineCap="round"/>
</vector>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="false">
<shape android:shape="oval">
<solid android:color="#dddddd"/>
</shape>
</item>
<item android:state_pressed="true">
<shape android:shape="oval">
<solid android:color="#888888"/>
</shape>
</item>
</selector>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:bottom="-8dp">
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="32dp"
android:bottomLeftRadius="0dp"
android:bottomRightRadius="0dp" />
<stroke android:width="4dp" android:color="#444444"/>
</shape>
</item>
</layer-list>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="#9d9d9d">
<item android:id="@android:id/mask">
<shape android:shape="rectangle">
<solid android:color="#9d9d9d" />
<corners android:radius="16dp" />
</shape>
</item>
</ripple>

View File

@@ -0,0 +1,13 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M12,9v3.75m-9.303,3.376c-0.866,1.5 0.217,3.374 1.948,3.374h14.71c1.73,0 2.813,-1.874 1.948,-3.374L13.949,3.378c-0.866,-1.5 -3.032,-1.5 -3.898,0L2.697,16.126ZM12,15.75h0.007v0.008H12v-0.008Z"
android:strokeLineJoin="round"
android:strokeWidth="1.5"
android:fillColor="#00000000"
android:strokeColor="@color/colorAccent"
android:strokeLineCap="round"/>
</vector>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.fragment.app.FragmentContainerView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/fragment_container_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:name="xyz.quaver.pupil.ui.fragment.TransferDirectionFragment" />

View File

@@ -0,0 +1,89 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
<TextView
android:id="@+id/textView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="80dp"
android:text="Transfer your data"
android:textAlignment="center"
android:textSize="28sp"
android:textStyle="bold"
app:layout_constraintTop_toTopOf="parent" />
<View
android:id="@+id/device"
android:layout_width="match_parent"
android:layout_height="300dp"
android:layout_marginHorizontal="64dp"
app:layout_constraintBottom_toBottomOf="parent"
android:background="@drawable/transfer_device"/>
<LinearLayout
android:id="@+id/out_button"
android:layout_width="100dp"
android:layout_height="100dp"
android:orientation="vertical"
android:gravity="center"
android:clickable="true"
android:focusable="true"
android:background="@drawable/transfer_ripple"
app:layout_constraintBottom_toTopOf="@id/device"
app:layout_constraintLeft_toLeftOf="@id/device"
app:layout_constraintRight_toRightOf="@id/device"
android:layout_marginBottom="32dp">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/out_arrow"
android:layout_width="48dp"
android:layout_height="48dp"
app:srcCompat="@drawable/arrow"
android:layout_marginBottom="4dp" />
<TextView
android:id="@+id/out_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Send data"
android:textStyle="bold"
android:layout_marginTop="4dp"/>
</LinearLayout>
<LinearLayout
android:id="@+id/in_button"
android:layout_width="100dp"
android:layout_height="100dp"
android:orientation="vertical"
android:gravity="center"
android:clickable="true"
android:focusable="true"
android:background="@drawable/transfer_ripple"
app:layout_constraintTop_toTopOf="@id/device"
app:layout_constraintLeft_toLeftOf="@id/device"
app:layout_constraintRight_toRightOf="@id/device"
android:layout_marginTop="32dp">
<TextView
android:id="@+id/in_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Receive data"
android:textStyle="bold"
android:layout_marginBottom="4dp"/>
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/in_arrow"
android:layout_width="48dp"
android:layout_height="48dp"
app:srcCompat="@drawable/arrow"
android:layout_marginTop="4dp"
android:rotation="180"/>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:focusable="true"
android:padding="16dp">
<TextView
android:id="@+id/device_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Gonsales Vorecek's Galaxy S22 Ultra"
android:textStyle="bold"
android:textSize="24sp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
android:layout_marginBottom="4dp"/>
<TextView
android:id="@+id/device_address"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="26:7D:2D:3A:4F:5E"
android:textSize="16sp"
app:layout_constraintTop_toBottomOf="@id/device_name"
app:layout_constraintLeft_toLeftOf="parent"
android:layout_marginTop="4dp"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/icon"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_marginTop="48dp"
app:srcCompat="@drawable/warning"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" />
<TextView
android:id="@+id/textView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="Permissions Missing"
android:textAlignment="center"
android:textSize="28sp"
android:textStyle="bold"
app:layout_constraintTop_toBottomOf="@id/icon" />
<com.google.android.material.button.MaterialButton
android:id="@+id/permissions_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Grant Permissions"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
android:layout_marginHorizontal="36dp"
android:layout_marginVertical="64dp"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/icon"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_marginTop="48dp"
app:srcCompat="@drawable/link"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" />
<TextView
android:id="@+id/textView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="Connect to your device"
android:textAlignment="center"
android:textSize="28sp"
android:textStyle="bold"
app:layout_constraintTop_toBottomOf="@id/icon" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/device_list"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
android:layout_marginHorizontal="32dp"
android:layout_marginVertical="32dp"
app:layout_constraintTop_toBottomOf="@id/textView"
app:layout_constraintBottom_toBottomOf="parent" />
<com.skyfishjy.library.RippleBackground
android:id="@+id/ripple"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:rb_color="@color/colorPrimaryDark"
app:rb_radius="32dp"
app:rb_type="strokeRipple"/>
<androidx.appcompat.widget.AppCompatButton
android:id="@+id/retry_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Retry"
style="@style/Widget.AppCompat.Button.Borderless"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
android:visibility="invisible"
android:layout_margin="32dp"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/icon"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_marginTop="48dp"
app:srcCompat="@drawable/link"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" />
<TextView
android:id="@+id/textView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="Wait for connection"
android:textAlignment="center"
android:textSize="28sp"
android:textStyle="bold"
app:layout_constraintTop_toBottomOf="@id/icon" />
<com.skyfishjy.library.RippleBackground
android:id="@+id/ripple"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintDimensionRatio="1"
app:layout_constraintTop_toTopOf="@id/barrier"
app:layout_constraintBottom_toBottomOf="@id/barrier"
app:rb_color="@color/colorPrimaryDark"
app:rb_radius="32dp"
app:rb_type="strokeRipple"/>
<androidx.constraintlayout.widget.Barrier
android:id="@+id/barrier"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:barrierDirection="top"
app:constraint_referenced_ids="device" />
<View
android:id="@+id/device"
android:layout_width="match_parent"
android:layout_height="300dp"
android:layout_marginHorizontal="64dp"
app:layout_constraintBottom_toBottomOf="parent"
android:background="@drawable/transfer_device"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -159,4 +159,5 @@
<string name="unaccessible_download_folder">アンドロイド11以上では外部からのアプリ内部空間接近が不可能です。ダウンロードフォルダを変更しますか</string>
<string name="settings_networking">ネットワーク</string>
<string name="settings_recover_downloads">ダウンロードデータベースを再構築</string>
<string name="settings_transfer_data">他の機器にデータを転送</string>
</resources>

View File

@@ -159,4 +159,5 @@
<string name="unaccessible_download_folder">안드로이드 11 이상에서는 외부에서 현재 다운로드 폴더에 접근할 수 없습니다. 변경하시겠습니까?</string>
<string name="settings_networking">네트워크</string>
<string name="settings_recover_downloads">다운로드 데이터베이스 복구</string>
<string name="settings_transfer_data">다른 기기에 데이터 전송</string>
</resources>

View File

@@ -174,6 +174,7 @@
<string name="settings_nomedia_title">Hide image from gallery</string>
<string name="settings_low_quality">Low quality images</string>
<string name="settings_low_quality_summary">Load low quality images to improve load speed and data usage</string>
<string name="settings_transfer_data">Transfer data to another device</string>
<!-- SETTINGS/APP LOCK -->

View File

@@ -52,6 +52,10 @@
app:defaultValue="8"
app:useSimpleSummaryProvider="true"/>
<Preference
app:key="transfer_data"
app:title="@string/settings_transfer_data"/>
<SwitchPreferenceCompat
app:key="nomedia"
app:title="@string/settings_nomedia_title"/>