~singpolyma/cheogram-android

fd808042a8e2e91448be08f64271a3f44e16b24f — Stephen Paul Weber 11 months ago 9b48d18
Restore backup prominent on welcome screen
M src/cheogram/java/eu/siacs/conversations/ui/WelcomeActivity.java => src/cheogram/java/eu/siacs/conversations/ui/WelcomeActivity.java +6 -0
@@ 202,6 202,12 @@ public class WelcomeActivity extends XmppActivity implements XmppConnectionServi
            addInviteUri(intent);
            startActivity(intent);
        });

        binding.useBackup.setOnClickListener(v -> {
            if (hasStoragePermission(REQUEST_IMPORT_BACKUP)) {
                startActivity(new Intent(this, ImportBackupActivity.class));
            }
        });
    }

    @Override

A src/cheogram/res/drawable/restore.xml => src/cheogram/res/drawable/restore.xml +22 -0
@@ 0,0 1,22 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:aapt="http://schemas.android.com/aapt"
    android:width="54.67484dp"
    android:height="54.67484dp"
    android:viewportWidth="20.29502"
    android:viewportHeight="20.29502">
  <path
      android:pathData="m11.5515,1.1493c-5.09,-0.14 -9.26,3.94 -9.26,9L0.5015,10.1493c-0.45,0 -0.67,0.54 -0.35,0.85l2.79,2.8c0.2,0.2 0.51,0.2 0.71,0l2.79,-2.8c0.32,-0.31 0.09,-0.85 -0.35,-0.85h-1.8c0,-3.9 3.18,-7.05 7.1,-7 3.72,0.05 6.85,3.18 6.9,6.9 0.05,3.91 -3.1,7.1 -7,7.1 -1.61,0 -3.1,-0.55 -4.28,-1.48 -0.4,-0.31 -0.96,-0.28 -1.32,0.08 -0.42,0.43 -0.39,1.13 0.08,1.5 1.52,1.19 3.44,1.9 5.52,1.9 5.05,0 9.14,-4.17 9,-9.26 -0.13,-4.69 -4.05,-8.61 -8.74,-8.74zM11.0415,6.1493c-0.41,0 -0.75,0.34 -0.75,0.75v3.68c0,0.35 0.19,0.68 0.49,0.86l3.12,1.85c0.36,0.21 0.82,0.09 1.03,-0.26 0.21,-0.36 0.09,-0.82 -0.26,-1.03l-2.88,-1.71L11.7915,6.8893c0,-0.4 -0.33,-0.74 -0.75,-0.74z"
      android:strokeColor="#00000000">
    <aapt:attr name="android:fillColor">
      <gradient 
          android:startY="4.2540646"
          android:startX="11.1118765"
          android:endY="16.208885"
          android:endX="20.240816"
          android:type="linear">
        <item android:offset="0" android:color="#FFFD5286"/>
        <item android:offset="1" android:color="#FFFF998C"/>
      </gradient>
    </aapt:attr>
  </path>
</vector>

M src/cheogram/res/layout/activity_welcome.xml => src/cheogram/res/layout/activity_welcome.xml +13 -1
@@ 243,7 243,6 @@
                        android:text="@string/i_already_have_an_account"
                        android:textColor="?colorAccent" />


                    <Button
                        android:id="@+id/use_snikket"
                        style="@style/Widget.Conversations.Button.Borderless"


@@ 256,6 255,19 @@
                        android:fontFamily="@font/poppins"
                        android:text="@string/i_am_snikket_user"
                        android:textColor="?colorAccent" />

                    <Button
                        android:id="@+id/use_backup"
                        style="@style/Widget.Conversations.Button.Borderless"
                        android:textAllCaps="false"
                        android:textSize="?TextSizeTitle"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_gravity="center"
                        android:drawableLeft="@drawable/restore"
                        android:fontFamily="@font/poppins"
                        android:text="@string/restore_backup"
                        android:textColor="?colorAccent" />
                </LinearLayout>
            </LinearLayout>
        </ScrollView>