diff options
| author | Lena <lena@omega> | 2026-01-01 00:00:00 +0000 |
|---|---|---|
| committer | Lena <lena@omega> | 2026-01-01 00:00:00 +0000 |
| commit | 7e04941bccb2683f8a6e3ee38a99c50129234dd1 (patch) | |
| tree | 471227fa437291e7a6b499e3de6c106c54eaf311 /app/src/main/res/layout/activity_main.xml | |
| download | rsend-7e04941bccb2683f8a6e3ee38a99c50129234dd1.tar.gz | |
rsend: push phone folders to a home SSH host over rsync
A small Android app for one-way folder backup, a KISS alternative to
Syncthing. It bundles rsync (built from pinned source via the NDK) and
a pure-Go SSH transport, both shipped in the APK as lib*.so and run from
the native library directory.
rsend pins the host key, stores the ed25519 identity Keystore-encrypted,
pushes each folder additively or as a mirror, and runs on demand or on a
WiFi-only schedule. The build is self-contained and reproducible: make
setup provisions the toolchain, make builds rsync, rsh, and the APK.
Diffstat (limited to 'app/src/main/res/layout/activity_main.xml')
| -rw-r--r-- | app/src/main/res/layout/activity_main.xml | 413 |
1 files changed, 413 insertions, 0 deletions
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000..d58f907 --- /dev/null +++ b/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,413 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/appRoot" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical"> + + <include layout="@layout/app_toolbar" /> + + <ScrollView + android:layout_width="match_parent" + android:layout_height="0dp" + android:layout_weight="1"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:padding="@dimen/space_m"> + + <!-- Status hero --> + <LinearLayout + style="@style/Widget.Rsend.Card" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:gravity="center_vertical"> + + <TextView + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:textAppearance="@style/TextAppearance.Rsend.SectionHeader" + android:text="Status" /> + + <TextView + android:id="@+id/appVersion" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textAppearance="@style/TextAppearance.Rsend.Caption" /> + </LinearLayout> + + <TextView + android:id="@+id/lastSync" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/space_s" + android:textAppearance="@style/TextAppearance.Rsend.Title" + android:textIsSelectable="true" + android:text="Last sync: never" /> + </LinearLayout> + + <!-- Primary action --> + <Button + android:id="@+id/btnSync" + style="@style/Widget.Rsend.Button.Primary" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="@dimen/space_m" + android:text="Sync now" /> + + <ProgressBar + android:id="@+id/syncBar" + style="?android:attr/progressBarStyleHorizontal" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:indeterminate="true" + android:visibility="gone" /> + + <TextView + android:id="@+id/syncStatus" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="@dimen/space_m" + android:textAppearance="@style/TextAppearance.Rsend.Caption" + android:visibility="gone" /> + + <!-- Setup --> + <LinearLayout + style="@style/Widget.Rsend.Card" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical"> + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="@dimen/space_s" + android:textAppearance="@style/TextAppearance.Rsend.SectionHeader" + android:text="Setup" /> + + <LinearLayout + android:id="@+id/rowRemote" + style="@style/Widget.Rsend.Row" + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <ImageView + android:layout_width="24dp" + android:layout_height="24dp" + android:layout_marginEnd="@dimen/space_m" + android:src="@drawable/ic_remote" + android:contentDescription="@null" /> + + <LinearLayout + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:orientation="vertical"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textAppearance="@style/TextAppearance.Rsend.Body" + android:text="Remote" /> + + <TextView + android:id="@+id/remoteValue" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textAppearance="@style/TextAppearance.Rsend.Caption" /> + </LinearLayout> + + <ImageView + android:layout_width="20dp" + android:layout_height="20dp" + android:src="@drawable/ic_chevron" + android:contentDescription="@null" /> + </LinearLayout> + + <View + android:layout_width="match_parent" + android:layout_height="@dimen/stroke" + android:layout_marginStart="40dp" + android:background="@color/outline" /> + + <LinearLayout + android:id="@+id/rowKey" + style="@style/Widget.Rsend.Row" + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <ImageView + android:layout_width="24dp" + android:layout_height="24dp" + android:layout_marginEnd="@dimen/space_m" + android:src="@drawable/ic_key" + android:contentDescription="@null" /> + + <LinearLayout + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:orientation="vertical"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textAppearance="@style/TextAppearance.Rsend.Body" + android:text="Identity key" /> + + <TextView + android:id="@+id/keyValue" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textAppearance="@style/TextAppearance.Rsend.Caption" /> + </LinearLayout> + + <ImageView + android:layout_width="20dp" + android:layout_height="20dp" + android:src="@drawable/ic_chevron" + android:contentDescription="@null" /> + </LinearLayout> + + <View + android:layout_width="match_parent" + android:layout_height="@dimen/stroke" + android:layout_marginStart="40dp" + android:background="@color/outline" /> + + <LinearLayout + android:id="@+id/rowSchedule" + style="@style/Widget.Rsend.Row" + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <ImageView + android:layout_width="24dp" + android:layout_height="24dp" + android:layout_marginEnd="@dimen/space_m" + android:src="@drawable/ic_schedule" + android:contentDescription="@null" /> + + <LinearLayout + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:orientation="vertical"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textAppearance="@style/TextAppearance.Rsend.Body" + android:text="Schedule" /> + + <TextView + android:id="@+id/scheduleValue" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textAppearance="@style/TextAppearance.Rsend.Caption" /> + </LinearLayout> + + <ImageView + android:layout_width="20dp" + android:layout_height="20dp" + android:src="@drawable/ic_chevron" + android:contentDescription="@null" /> + </LinearLayout> + </LinearLayout> + + <!-- Permissions --> + <LinearLayout + style="@style/Widget.Rsend.Card" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical"> + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="@dimen/space_s" + android:textAppearance="@style/TextAppearance.Rsend.SectionHeader" + android:text="Permissions" /> + + <LinearLayout + android:id="@+id/rowAllFiles" + style="@style/Widget.Rsend.Row" + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <View + android:id="@+id/dotAllFiles" + android:layout_width="10dp" + android:layout_height="10dp" + android:layout_marginStart="7dp" + android:layout_marginEnd="@dimen/space_l" + android:background="@drawable/dot_off" /> + + <LinearLayout + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:orientation="vertical"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textAppearance="@style/TextAppearance.Rsend.Body" + android:text="All-files access" /> + + <TextView + android:id="@+id/valAllFiles" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textAppearance="@style/TextAppearance.Rsend.Caption" /> + </LinearLayout> + + <ImageView + android:layout_width="20dp" + android:layout_height="20dp" + android:src="@drawable/ic_chevron" + android:contentDescription="@null" /> + </LinearLayout> + + <View + android:layout_width="match_parent" + android:layout_height="@dimen/stroke" + android:layout_marginStart="40dp" + android:background="@color/outline" /> + + <LinearLayout + android:id="@+id/rowNotif" + style="@style/Widget.Rsend.Row" + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <View + android:id="@+id/dotNotif" + android:layout_width="10dp" + android:layout_height="10dp" + android:layout_marginStart="7dp" + android:layout_marginEnd="@dimen/space_l" + android:background="@drawable/dot_off" /> + + <LinearLayout + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:orientation="vertical"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textAppearance="@style/TextAppearance.Rsend.Body" + android:text="Notifications" /> + + <TextView + android:id="@+id/valNotif" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textAppearance="@style/TextAppearance.Rsend.Caption" /> + </LinearLayout> + + <ImageView + android:layout_width="20dp" + android:layout_height="20dp" + android:src="@drawable/ic_chevron" + android:contentDescription="@null" /> + </LinearLayout> + + <View + android:layout_width="match_parent" + android:layout_height="@dimen/stroke" + android:layout_marginStart="40dp" + android:background="@color/outline" /> + + <LinearLayout + android:id="@+id/rowBattery" + style="@style/Widget.Rsend.Row" + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <View + android:id="@+id/dotBattery" + android:layout_width="10dp" + android:layout_height="10dp" + android:layout_marginStart="7dp" + android:layout_marginEnd="@dimen/space_l" + android:background="@drawable/dot_off" /> + + <LinearLayout + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:orientation="vertical"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textAppearance="@style/TextAppearance.Rsend.Body" + android:text="Battery" /> + + <TextView + android:id="@+id/valBattery" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textAppearance="@style/TextAppearance.Rsend.Caption" /> + </LinearLayout> + + <ImageView + android:layout_width="20dp" + android:layout_height="20dp" + android:src="@drawable/ic_chevron" + android:contentDescription="@null" /> + </LinearLayout> + </LinearLayout> + + <!-- Folders --> + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginStart="@dimen/space_s" + android:layout_marginBottom="@dimen/space_s" + android:textAppearance="@style/TextAppearance.Rsend.SectionHeader" + android:text="Folders" /> + + <LinearLayout + android:id="@+id/folders" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" /> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal"> + + <Button + android:id="@+id/btnAddFolder" + style="@style/Widget.Rsend.Button.Secondary" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:layout_marginEnd="@dimen/space_s" + android:text="+ Add folder" /> + + <Button + android:id="@+id/btnLog" + style="@style/Widget.Rsend.Button.Secondary" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:text="View log" /> + </LinearLayout> + </LinearLayout> + </ScrollView> +</LinearLayout> |