move "experimental" hint below qr-code/scanner

the hint in the title was regarded as "not so nice" on first tests
and was even overseen.
This commit is contained in:
B. Petersen
2023-03-26 15:33:52 +02:00
committed by bjoern
parent f3b1493dc3
commit b3d21f0be9
5 changed files with 29 additions and 3 deletions
@@ -68,7 +68,7 @@
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="7"
android:layout_weight="10"
android:layout_marginStart="24dp"
android:layout_marginEnd="24dp"
android:orientation="vertical">
@@ -86,4 +86,15 @@
android:layout_width="match_parent"
android:layout_height="0dp"/>
<TextView
android:id="@+id/bottom_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/multidevice_experimental_hint"
android:textColor="?attr/emoji_text_color"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="16dp"
android:textSize="16sp" />
</LinearLayout>
+13
View File
@@ -108,4 +108,17 @@
android:layout_marginBottom="16dp"
android:contentDescription="@string/qrscan_title" />
<TextView
android:id="@+id/bottom_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/multidevice_experimental_hint"
android:textColor="?attr/emoji_text_color"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="16dp"
android:textSize="16sp"
android:visibility="gone"
tools:visibility="visible"/>
</LinearLayout>
@@ -41,6 +41,7 @@ public class BackupProviderFragment extends Fragment implements DcEventCenter.Dc
private ProgressBar progressBar;
private View topText;
private SVGImageView qrImageView;
private View bottomText;
@Override
public void onCreate(Bundle bundle) {
@@ -55,6 +56,7 @@ public class BackupProviderFragment extends Fragment implements DcEventCenter.Dc
progressBar = view.findViewById(R.id.progress_bar);
topText = view.findViewById(R.id.top_text);
qrImageView = view.findViewById(R.id.qrImage);
bottomText = view.findViewById(R.id.bottom_text);
setHasOptionsMenu(true);
statusLine.setText(R.string.preparing_account);
@@ -82,6 +84,7 @@ public class BackupProviderFragment extends Fragment implements DcEventCenter.Dc
} catch (SVGParseException e) {
e.printStackTrace();
}
bottomText.setVisibility(View.VISIBLE);
new Thread(() -> {
Log.i(TAG, "##### waitForReceiver() with qr: "+dcBackupProvider.getQr());
dcBackupProvider.waitForReceiver();
@@ -174,6 +177,7 @@ public class BackupProviderFragment extends Fragment implements DcEventCenter.Dc
if (hideQrCode && qrImageView.getVisibility() != View.GONE) {
qrImageView.setVisibility(View.GONE);
topText.setVisibility(View.GONE);
bottomText.setVisibility(View.GONE);
statusLine.setVisibility(View.VISIBLE);
progressBar.setVisibility(permille == 1000 ? View.GONE : View.VISIBLE);
}
@@ -94,7 +94,6 @@ public class BackupTransferActivity extends BaseActionBarActivity {
supportActionBar.setDisplayHomeAsUpEnabled(true);
supportActionBar.setHomeAsUpIndicator(R.drawable.ic_close_white_24dp);
supportActionBar.setTitle(title);
supportActionBar.setSubtitle(R.string.multidevice_experimental_hint);
}
@Override
@@ -40,7 +40,6 @@ public class RegistrationQrActivity extends BaseActionBarActivity {
if (addAsAnotherDevice) {
setContentView(R.layout.activity_registration_2nd_device_qr);
getSupportActionBar().setTitle(R.string.multidevice_receiver_title);
getSupportActionBar().setSubtitle(R.string.multidevice_experimental_hint);
} else {
setContentView(R.layout.activity_registration_qr);
getSupportActionBar().setTitle(R.string.scan_invitation_code);