mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-22 07:39:53 +01:00
improve ExistingBackupFragment
This commit is contained in:
@@ -24,8 +24,6 @@ public class ExistingBackupFragment extends BaseFragment {
|
|||||||
private static final String THRESHOLD = "threshold";
|
private static final String THRESHOLD = "threshold";
|
||||||
private static final String CUSTODIANS = "custodians";
|
private static final String CUSTODIANS = "custodians";
|
||||||
public static final String TAG = ExistingBackupFragment.class.getName();
|
public static final String TAG = ExistingBackupFragment.class.getName();
|
||||||
private TextView textViewBackupMetadata;
|
|
||||||
|
|
||||||
|
|
||||||
public static ExistingBackupFragment newInstance(
|
public static ExistingBackupFragment newInstance(
|
||||||
BackupMetadata backupMetadata) {
|
BackupMetadata backupMetadata) {
|
||||||
@@ -58,10 +56,12 @@ public class ExistingBackupFragment extends BaseFragment {
|
|||||||
ArrayList<String> custodianNames = args.getStringArrayList(CUSTODIANS);
|
ArrayList<String> custodianNames = args.getStringArrayList(CUSTODIANS);
|
||||||
String custodianNamesString = "";
|
String custodianNamesString = "";
|
||||||
for (String custodianName : custodianNames) {
|
for (String custodianName : custodianNames) {
|
||||||
custodianNamesString += custodianName + " ";
|
custodianNamesString += custodianName + ", ";
|
||||||
}
|
}
|
||||||
textViewBackupMetadata = view.findViewById(R.id.textViewBackupMetadata);
|
TextView textViewThreshold = view.findViewById(R.id.textViewThreshold);
|
||||||
textViewBackupMetadata.setText(String.format("Threshold is %d", args.getInt(THRESHOLD)) + custodianNamesString);
|
textViewThreshold.setText(String.format("%d of %d contacts needed to restore account", args.getInt(THRESHOLD), custodianNames.size()));
|
||||||
|
TextView textViewCustodians = view.findViewById(R.id.textViewCustodians);
|
||||||
|
textViewCustodians.setText(custodianNamesString);
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,22 +6,30 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
||||||
android:paddingLeft="@dimen/margin_large"
|
android:paddingLeft="@dimen/margin_large"
|
||||||
android:paddingTop="@dimen/margin_medium"
|
android:paddingTop="@dimen/margin_large"
|
||||||
android:paddingRight="@dimen/margin_large"
|
android:paddingRight="@dimen/margin_large"
|
||||||
android:paddingBottom="@dimen/margin_medium"
|
android:paddingBottom="@dimen/margin_medium"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/textViewBackupMetadata"
|
android:id="@+id/textViewThreshold"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="placeholder threshold"
|
||||||
|
android:textSize="16sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textViewCustodians"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@string/backup_done_info"
|
android:text="@string/backup_done_info"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="1.0"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toBottomOf="@+id/textViewThreshold" />
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
tools:layout_editor_absoluteY="313dp" />
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
Reference in New Issue
Block a user