sftp上传实现

This commit is contained in:
laoyuyu
2020-01-18 10:00:06 +08:00
parent 50b265f22a
commit d217ebcb25
59 changed files with 1616 additions and 387 deletions

View File

@@ -44,14 +44,14 @@
tools:context=".core.download.SingleTaskActivity"
>
<include layout="@layout/layout_bar"/>
<include layout="@layout/layout_bar" />
<com.arialyy.simple.widget.SvgTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginTop="16dp"
android:layout_marginRight="16dp"
bind:iconClickListener="@{() -> viewModel.chooseUrl()}"
bind:svg_text_view_icon="@drawable/ic_modify"
bind:text="@{@string/url(url)}"
@@ -61,8 +61,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginTop="8dp"
android:layout_marginRight="16dp"
bind:iconClickListener="@{() -> viewModel.chooseFilePath()}"
bind:svg_text_view_icon="@drawable/ic_choose_file"
bind:text="@{@string/file_path(filePath)}"
@@ -76,13 +76,23 @@
bind:stateStr="@{stateStr}"
/>
<androidx.appcompat.widget.AppCompatSeekBar
android:id="@+id/pb"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
<FrameLayout
android:background="@color/white"
android:id="@+id/video_content"
android:layout_width="match_parent"
android:layout_height="200dp"
android:layout_marginTop="16dp"
/>
android:background="@color/white"
>
</FrameLayout>
</LinearLayout>
</layout>

View File

@@ -0,0 +1,83 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:bind="http://schemas.android.com/apk/res-auto"
>
<data>
<variable
name="fileSize"
type="String"
/>
<variable
name="speed"
type="String"
/>
<variable
name="progress"
type="int"
/>
<variable
name="url"
type="String"
/>
<variable
name="filePath"
type="String"
/>
<variable
name="viewModel"
type="com.arialyy.simple.core.upload.SFtpUploadActivity"
/>
<variable
name="stateStr"
type="String"
/>
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
<include layout="@layout/layout_bar"/>
<com.arialyy.simple.widget.SvgTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginTop="16dp"
bind:iconClickListener="@{() -> viewModel.chooseUrl()}"
bind:svg_text_view_icon="@drawable/ic_modify"
bind:text="@{@string/url(url)}"
/>
<com.arialyy.simple.widget.SvgTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginTop="8dp"
bind:iconClickListener="@{() -> viewModel.chooseFilePath()}"
bind:svg_text_view_icon="@drawable/ic_choose_file"
bind:text="@{@string/file_path(filePath)}"
/>
<include
layout="@layout/layout_content_single"
bind:fileSize="@{fileSize}"
bind:progress="@{progress}"
bind:speed="@{speed}"
bind:stateStr="@{stateStr}"
/>
<!-- <com.arialyy.simple.widget.CodeView-->
<!-- android:id="@+id/code_view"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="match_parent"-->
<!-- />-->
</LinearLayout>
</layout>

View File

@@ -41,6 +41,7 @@
<item>M3U8 点播文件下载</item>
<item>M3U8 直播文件下载</item>
<item>SFTP 下载</item>
<item>SFTP 上传</item>
</string-array>
<string-array name="main_items_desc">
@@ -53,6 +54,7 @@
<item>下载M3U8点播文件</item>
<item>下载M3U8直播文件</item>
<item>SFTP单文件下载</item>
<item>SFTP单文件上传</item>
</string-array>
<string-array name="download_items">