应用备份打包上传功能完成
This commit is contained in:
@@ -9,11 +9,18 @@
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="right">
|
||||
|
||||
<Button
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:text="⚙️"
|
||||
android:onClick="onSFTPSettings"/>
|
||||
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:text="Backups"
|
||||
android:onClick="onBackups"/>
|
||||
|
||||
|
||||
163
libappbase/src/main/res/layout/dialog_sftp_backup_settings.xml
Normal file
163
libappbase/src/main/res/layout/dialog_sftp_backup_settings.xml
Normal file
@@ -0,0 +1,163 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="20dp"
|
||||
android:gravity="center_horizontal">
|
||||
|
||||
<!-- 标题 -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="SFTP备份配置"
|
||||
android:textSize="18sp"
|
||||
android:textColor="#333333"
|
||||
android:layout_marginBottom="20dp"/>
|
||||
|
||||
<!-- 基础配置区域 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginBottom="15dp">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="基础配置"
|
||||
android:textSize="16sp"
|
||||
android:textColor="#666666"
|
||||
android:layout_marginBottom="10dp"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_sftp_server"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:hint="SFTP服务器地址(IP/域名)"
|
||||
android:paddingHorizontal="15dp"
|
||||
android:background="@drawable/shape_edittext_bg"
|
||||
android:layout_marginBottom="8dp"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_sftp_port"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:hint="端口号(默认22)"
|
||||
android:inputType="number"
|
||||
android:paddingHorizontal="15dp"
|
||||
android:background="@drawable/shape_edittext_bg"
|
||||
android:layout_marginBottom="8dp"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_sftp_username"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:hint="登录用户名"
|
||||
android:paddingHorizontal="15dp"
|
||||
android:background="@drawable/shape_edittext_bg"
|
||||
android:layout_marginBottom="8dp"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_sftp_pwd"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:hint="登录密码"
|
||||
android:inputType="textPassword"
|
||||
android:paddingHorizontal="15dp"
|
||||
android:background="@drawable/shape_edittext_bg"/>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 秘钥配置区域 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginBottom="15dp">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="秘钥配置(可选,优先账号密码)"
|
||||
android:textSize="16sp"
|
||||
android:textColor="#666666"
|
||||
android:layout_marginBottom="10dp"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_sftp_key_path"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:hint="秘钥本地路径(如/sdcard/key.pem)"
|
||||
android:paddingHorizontal="15dp"
|
||||
android:background="@drawable/shape_edittext_bg"
|
||||
android:layout_marginBottom="8dp"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_sftp_key_pwd"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:hint="秘钥密码(无则留空)"
|
||||
android:inputType="textPassword"
|
||||
android:paddingHorizontal="15dp"
|
||||
android:background="@drawable/shape_edittext_bg"/>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 高级配置区域 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginBottom="20dp">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="高级配置"
|
||||
android:textSize="16sp"
|
||||
android:textColor="#666666"
|
||||
android:layout_marginBottom="10dp"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_sftp_charset"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:hint="编码(默认UTF-8)"
|
||||
android:paddingHorizontal="15dp"
|
||||
android:background="@drawable/shape_edittext_bg"
|
||||
android:text="UTF-8"/>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 操作按钮 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center"
|
||||
android:spacing="10dp">
|
||||
<Button
|
||||
android:id="@+id/btn_sftp_clear"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_weight="1"
|
||||
android:text="清空"
|
||||
android:backgroundTint="#FF9500"
|
||||
android:textColor="#FFFFFF"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_sftp_cancel"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_weight="1"
|
||||
android:text="取消"
|
||||
android:backgroundTint="#999999"
|
||||
android:textColor="#FFFFFF"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_sftp_save"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_weight="1"
|
||||
android:text="保存"
|
||||
android:backgroundTint="#007AFF"
|
||||
android:textColor="#FFFFFF"/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
Reference in New Issue
Block a user