- 新增WebDAV同步功能相关文件 - 新增CustomSwitch自定义开关组件 - 新增SyncCodeManager、UpdateInstaller、WebDAVSyncManager工具类 - 新增build_all_release.sh构建脚本 - 更新多个Dialog和Activity文件 - 更新字符串资源文件 - 删除apk/release目录下的旧文件
207 lines
7.2 KiB
XML
207 lines
7.2 KiB
XML
<?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"
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:orientation="vertical"
|
||
android:paddingStart="24dp"
|
||
android:paddingTop="16dp"
|
||
android:paddingEnd="24dp"
|
||
android:paddingBottom="16dp">
|
||
|
||
<!-- 说明文字 -->
|
||
<TextView
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginBottom="16dp"
|
||
android:text="请输入您在WebDAV服务提供商(如坚果云)注册的账号和密码(坚果云的密码为应用密码而非登录密码)"
|
||
android:textColor="@color/white"
|
||
android:textSize="12sp"
|
||
android:alpha="0.7"
|
||
android:lineSpacingMultiplier="1.2" />
|
||
|
||
<!-- 服务提供商选择 -->
|
||
<LinearLayout
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginBottom="16dp"
|
||
android:orientation="horizontal"
|
||
android:gravity="center_vertical">
|
||
|
||
<TextView
|
||
android:layout_width="wrap_content"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginEnd="16dp"
|
||
android:text="服务提供商"
|
||
android:textColor="@color/white"
|
||
android:textSize="16sp" />
|
||
|
||
<TextView
|
||
android:id="@+id/providerText"
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:gravity="end"
|
||
android:text="坚果云"
|
||
android:textColor="@color/white"
|
||
android:textSize="16sp"
|
||
android:background="?attr/selectableItemBackground"
|
||
android:padding="12dp"
|
||
android:clickable="true"
|
||
android:focusable="true" />
|
||
|
||
</LinearLayout>
|
||
|
||
<!-- 服务器地址(自定义时显示) -->
|
||
<com.google.android.material.textfield.TextInputLayout
|
||
android:id="@+id/urlInput"
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginBottom="16dp"
|
||
android:visibility="gone"
|
||
app:hintEnabled="false">
|
||
|
||
<com.google.android.material.textfield.TextInputEditText
|
||
android:id="@+id/urlText"
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:hint="WebDAV服务器地址(如:https://example.com/webdav)"
|
||
android:imeOptions="actionNext"
|
||
android:importantForAutofill="no"
|
||
android:inputType="textUri"
|
||
android:singleLine="true" />
|
||
|
||
</com.google.android.material.textfield.TextInputLayout>
|
||
|
||
<!-- 用户名 -->
|
||
<com.google.android.material.textfield.TextInputLayout
|
||
android:id="@+id/usernameInput"
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginBottom="16dp"
|
||
app:hintEnabled="false">
|
||
|
||
<com.google.android.material.textfield.TextInputEditText
|
||
android:id="@+id/usernameText"
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:hint="用户名"
|
||
android:imeOptions="actionNext"
|
||
android:importantForAutofill="no"
|
||
android:inputType="text"
|
||
android:singleLine="true" />
|
||
|
||
</com.google.android.material.textfield.TextInputLayout>
|
||
|
||
<!-- 密码 -->
|
||
<com.google.android.material.textfield.TextInputLayout
|
||
android:id="@+id/passwordInput"
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginBottom="16dp"
|
||
app:hintEnabled="false"
|
||
app:passwordToggleEnabled="true">
|
||
|
||
<com.google.android.material.textfield.TextInputEditText
|
||
android:id="@+id/passwordText"
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:hint="密码"
|
||
android:imeOptions="actionDone"
|
||
android:importantForAutofill="no"
|
||
android:inputType="textPassword"
|
||
android:singleLine="true" />
|
||
|
||
</com.google.android.material.textfield.TextInputLayout>
|
||
|
||
<!-- 自动同步开关 -->
|
||
<LinearLayout
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginBottom="16dp"
|
||
android:gravity="center_vertical"
|
||
android:orientation="horizontal">
|
||
|
||
<TextView
|
||
android:layout_width="0dp"
|
||
android:layout_height="wrap_content"
|
||
android:layout_weight="1"
|
||
android:text="自动同步"
|
||
android:textColor="@color/white"
|
||
android:textSize="16sp" />
|
||
|
||
<com.fongmi.android.tv.ui.custom.CustomSwitch
|
||
android:id="@+id/autoSyncSwitch"
|
||
android:layout_width="wrap_content"
|
||
android:layout_height="wrap_content" />
|
||
|
||
</LinearLayout>
|
||
|
||
<!-- 同步间隔 -->
|
||
<LinearLayout
|
||
android:id="@+id/syncIntervalContainer"
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginBottom="16dp"
|
||
android:gravity="center_vertical"
|
||
android:orientation="horizontal"
|
||
android:visibility="gone">
|
||
|
||
<TextView
|
||
android:layout_width="0dp"
|
||
android:layout_height="wrap_content"
|
||
android:layout_weight="1"
|
||
android:text="同步间隔(分钟)"
|
||
android:textColor="@color/white"
|
||
android:textSize="16sp" />
|
||
|
||
<TextView
|
||
android:id="@+id/syncIntervalText"
|
||
android:layout_width="wrap_content"
|
||
android:layout_height="wrap_content"
|
||
android:text="30"
|
||
android:textColor="@color/white"
|
||
android:textSize="16sp" />
|
||
|
||
</LinearLayout>
|
||
|
||
<!-- 操作按钮区域 -->
|
||
<LinearLayout
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:orientation="horizontal"
|
||
android:gravity="end">
|
||
|
||
<!-- 测试连接按钮 -->
|
||
<com.google.android.material.button.MaterialButton
|
||
android:id="@+id/testButton"
|
||
android:layout_width="wrap_content"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginEnd="8dp"
|
||
android:text="测试连接"
|
||
style="@style/Widget.Material3.Button.OutlinedButton" />
|
||
|
||
<!-- 立即同步按钮 -->
|
||
<com.google.android.material.button.MaterialButton
|
||
android:id="@+id/syncButton"
|
||
android:layout_width="wrap_content"
|
||
android:layout_height="wrap_content"
|
||
android:text="立即同步"
|
||
style="@style/Widget.Material3.Button.OutlinedButton" />
|
||
|
||
</LinearLayout>
|
||
|
||
<!-- 状态提示 -->
|
||
<TextView
|
||
android:id="@+id/statusText"
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginTop="8dp"
|
||
android:gravity="center"
|
||
android:text=""
|
||
android:textColor="@color/white"
|
||
android:textSize="14sp"
|
||
android:visibility="gone" />
|
||
|
||
</LinearLayout>
|
||
|