add fragments (WIP)

This commit is contained in:
ameba23
2021-02-26 10:45:29 +01:00
parent ff4640b789
commit dcda13db64
38 changed files with 1705 additions and 0 deletions

View File

@@ -0,0 +1,88 @@
package org.briarproject.briar.android.darkcrystal;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import org.briarproject.bramble.api.nullsafety.MethodsNotNullByDefault;
import org.briarproject.bramble.api.nullsafety.ParametersNotNullByDefault;
import org.briarproject.briar.R;
import org.briarproject.briar.android.activity.ActivityComponent;
import org.briarproject.briar.android.backup.creation.CreateBackupController;
import org.briarproject.briar.android.contact.BaseContactListAdapter;
import org.briarproject.briar.android.contactselection.BaseContactSelectorFragment;
import org.briarproject.briar.android.contactselection.ContactDisplayAdapter;
import org.briarproject.briar.android.contactselection.ContactSelectorController;
import org.briarproject.briar.android.contactselection.SelectableContactItem;
import javax.inject.Inject;
import androidx.annotation.Nullable;
import static java.util.Objects.requireNonNull;
@MethodsNotNullByDefault
@ParametersNotNullByDefault
public class CustodianDisplayFragment extends BaseContactSelectorFragment<SelectableContactItem, ContactDisplayAdapter> {
public static final String TAG = CustodianDisplayFragment.class.getName();
@Inject
CreateBackupController controller;
public static CustodianDisplayFragment newInstance() {
Bundle args = new Bundle();
args.putInt(BaseContactSelectorFragment.ARG_LAYOUT, R.layout.list_with_headline);
CustodianDisplayFragment fragment = new CustodianDisplayFragment();
fragment.setArguments(args);
return fragment;
}
@Override
protected ContactDisplayAdapter getAdapter(Context context,
BaseContactListAdapter.OnContactClickListener<SelectableContactItem> listener) {
return new ContactDisplayAdapter(context, listener);
}
@Override
protected void onSelectionChanged() {
}
public View onCreateView(LayoutInflater inflater,
@javax.annotation.Nullable ViewGroup container,
@javax.annotation.Nullable Bundle savedInstanceState) {
View view = super.onCreateView(inflater, container, savedInstanceState);
TextView headline = view.findViewById(R.id.headline);
headline.setText(R.string.backup_created);
return view;
}
@Override
public void injectFragment(ActivityComponent component) {
component.inject(this);
}
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requireNonNull(getActivity()).setTitle(R.string.activity_name_distributed_backup);
}
@Override
protected ContactSelectorController<SelectableContactItem> getController() {
controller.setMax(5);
return controller;
}
@Override
public String getUniqueTag() {
return TAG;
}
}

View File

@@ -0,0 +1,91 @@
package org.briarproject.briar.android.darkcrystal;
import android.os.Bundle;
import android.view.MenuItem;
import android.widget.Toast;
import org.briarproject.bramble.api.contact.ContactId;
import org.briarproject.bramble.api.db.DbException;
import org.briarproject.bramble.api.nullsafety.MethodsNotNullByDefault;
import org.briarproject.bramble.api.nullsafety.ParametersNotNullByDefault;
import org.briarproject.bramble.api.sync.GroupId;
import org.briarproject.briar.R;
import org.briarproject.briar.android.activity.ActivityComponent;
import org.briarproject.briar.android.backup.creation.CreateBackupController;
import org.briarproject.briar.android.contactselection.BaseContactSelectorAdapter;
import org.briarproject.briar.android.contactselection.ContactSelectorController;
import org.briarproject.briar.android.contactselection.ContactSelectorFragment;
import org.briarproject.briar.android.contactselection.SelectableContactItem;
import org.briarproject.briar.android.controller.handler.ResultExceptionHandler;
import java.util.Collection;
import javax.inject.Inject;
import androidx.annotation.Nullable;
import static java.util.Objects.requireNonNull;
@MethodsNotNullByDefault
@ParametersNotNullByDefault
public class CustodianSelectorFragment extends ContactSelectorFragment {
public static final String TAG = CustodianSelectorFragment.class.getName();
@Inject
CreateBackupController controller;
public static CustodianSelectorFragment newInstance() {
Bundle args = new Bundle();
CustodianSelectorFragment fragment = new CustodianSelectorFragment();
fragment.setArguments(args);
return fragment;
}
@Override
public void injectFragment(ActivityComponent component) {
component.inject(this);
}
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requireNonNull(getActivity()).setTitle(R.string.title_select_custodians);
}
@Override
protected ContactSelectorController<SelectableContactItem> getController() {
return controller;
}
@Override
public String getUniqueTag() {
return TAG;
}
@Override
protected void onSelectionChanged() {
super.onSelectionChanged();
if (menu == null) return;
MenuItem item = menu.findItem(R.id.action_contacts_selected);
if (item == null) return;
BaseContactSelectorAdapter a = adapter;
selectedContacts = a.getSelectedContactIds();
int n = selectedContacts.size();
int min = 2;
boolean enough = n >= min;
item.setVisible(enough);
if (n == 0) {
Toast.makeText(getContext(), String.format(getString(R.string.select_at_least_n_contacts), min),
Toast.LENGTH_SHORT).show();
} else if (n < min) {
Toast.makeText(getContext(), String.format(getString(R.string.select_at_least_n_more_contacts), min - n),
Toast.LENGTH_SHORT).show();
}
}
}

View File

@@ -0,0 +1,57 @@
package org.briarproject.briar.android.socialbackup;
import android.os.Bundle;
import android.widget.Toast;
import androidx.fragment.app.FragmentTransaction;
import org.briarproject.bramble.api.contact.ContactId;
import org.briarproject.briar.R;
import org.briarproject.briar.android.activity.ActivityComponent;
import org.briarproject.briar.android.activity.BriarActivity;
import org.briarproject.briar.android.contactselection.ContactSelectorListener;
import org.briarproject.briar.android.fragment.BaseFragment;
import java.util.Collection;
public class DistributedBackupActivity extends BriarActivity implements
BaseFragment.BaseFragmentListener, ContactSelectorListener,
ThresholdDefinedListener, ShardsSentDismissedListener {
@Override
public void injectActivity(ActivityComponent component) {
component.inject(this);
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_distributed_backup);
CustodianSelectorFragment fragment =
CustodianSelectorFragment.newInstance();
showInitialFragment(fragment);
}
@Override
public void contactsSelected(Collection<ContactId> contacts) {
Toast.makeText(this,
String.format("selected %d contacts", contacts.size()),
Toast.LENGTH_SHORT).show();
ThresholdSelectorFragment fragment = new ThresholdSelectorFragment();
showNextFragment(fragment);
}
@Override
public void thresholdDefined() {
ShardsSentFragment fragment = new ShardsSentFragment();
showNextFragment(fragment);
}
@Override
public void shardsSentDismissed() {
finish();
}
}

View File

@@ -0,0 +1,39 @@
package org.briarproject.briar.android.darkcrystal;
import android.os.Bundle;
import android.widget.Toast;
import org.briarproject.bramble.api.contact.ContactId;
import org.briarproject.briar.R;
import org.briarproject.briar.android.activity.ActivityComponent;
import org.briarproject.briar.android.activity.BriarActivity;
import org.briarproject.briar.android.contactselection.ContactSelectorListener;
import org.briarproject.briar.android.fragment.BaseFragment;
import java.util.Collection;
public class OldDistributedBackupActivity extends BriarActivity
implements BaseFragment.BaseFragmentListener, ContactSelectorListener {
@Override
public void injectActivity(ActivityComponent component) {
component.inject(this);
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_distributed_backup);
CustodianDisplayFragment fragment =
CustodianDisplayFragment.newInstance();
showInitialFragment(fragment);
}
@Override
public void contactsSelected(Collection<ContactId> contacts) {
// do nothing
}
}

View File

@@ -0,0 +1,10 @@
package org.briarproject.briar.android.socialbackup;
import androidx.annotation.UiThread;
public interface ShardsSentDismissedListener {
@UiThread
void shardsSentDismissed();
}

View File

@@ -0,0 +1,65 @@
package org.briarproject.briar.android.socialbackup;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import org.briarproject.briar.R;
import org.briarproject.briar.android.activity.ActivityComponent;
import org.briarproject.briar.android.fragment.BaseFragment;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import static java.util.Objects.requireNonNull;
public class ShardsSentFragment extends BaseFragment {
public static final String TAG = ShardsSentFragment.class.getName();
protected ShardsSentDismissedListener listener;
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requireActivity().setTitle(R.string.title_distributed_backup);
}
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_shards_sent,
container, false);
Button button = view.findViewById(R.id.button);
button.setOnClickListener(e -> {
listener.shardsSentDismissed();
});
return view;
}
@Override
public void onAttach(Context context) {
super.onAttach(context);
listener = (ShardsSentDismissedListener) context;
}
@Override
public String getUniqueTag() {
return TAG;
}
@Override
public void injectFragment(ActivityComponent component) {
component.inject(this);
}
}

View File

@@ -0,0 +1,10 @@
package org.briarproject.briar.android.socialbackup;
import androidx.annotation.UiThread;
public interface ThresholdDefinedListener {
@UiThread
void thresholdDefined();
}

View File

@@ -0,0 +1,125 @@
package org.briarproject.briar.android.socialbackup;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.SeekBar;
import android.widget.TextView;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import org.briarproject.briar.R;
import org.briarproject.briar.android.activity.ActivityComponent;
import org.briarproject.briar.android.contactselection.ContactSelectorListener;
import org.briarproject.briar.android.fragment.BaseFragment;
import static java.util.Objects.requireNonNull;
public class ThresholdSelectorFragment extends BaseFragment {
public static final String TAG = ThresholdSelectorFragment.class.getName();
protected ThresholdDefinedListener listener;
private SeekBar seekBar;
private ImageView image;
private TextView message;
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requireNonNull(getActivity()).setTitle(R.string.title_define_threshold);
}
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_select_threshold,
container, false);
seekBar = view.findViewById(R.id.seekBar);
image = view.findViewById(R.id.imageView);
message = view.findViewById(R.id.textViewMessage);
seekBar.setMax(2);
seekBar.setOnSeekBarChangeListener(new SeekBarListener());
seekBar.setProgress(1);
return view;
}
@Override
public void onAttach(Context context) {
super.onAttach(context);
listener = (ThresholdDefinedListener) context;
}
@Override
public String getUniqueTag() {
return TAG;
}
@Override
public void injectFragment(ActivityComponent component) {
component.inject(this);
}
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
inflater.inflate(R.menu.define_threshold_actions, menu);
super.onCreateOptionsMenu(menu, inflater);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.action_threshold_defined:
listener.thresholdDefined();
return true;
default:
return super.onOptionsItemSelected(item);
}
}
private class SeekBarListener implements SeekBar.OnSeekBarChangeListener {
@Override
public void onProgressChanged(SeekBar seekBar, int progress,
boolean fromUser) {
// progress can be 0, 1, 2
int drawable = R.drawable.ic_pie_2_of_5;
switch (progress) {
case 1:
drawable = R.drawable.ic_pie_3_of_5;
break;
case 2:
drawable = R.drawable.ic_pie_4_of_5;
break;
}
int text = progress < 1 ? R.string.threshold_insecure : R.string.threshold_secure;
image.setImageDrawable(getContext().getResources().getDrawable(drawable));
message.setText(text);
}
@Override
public void onStartTrackingTouch(SeekBar seekBar) {
// do nothing
}
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
// do nothing
}
}
}

View File

@@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#29C400"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M19.77,5.03l1.4,1.4L8.43,19.17l-5.6,-5.6 1.4,-1.4 4.2,4.2L19.77,5.03m0,-2.83L8.43,13.54l-4.2,-4.2L0,13.57 8.43,22 24,6.43 19.77,2.2z"/>
</vector>

View File

@@ -0,0 +1,39 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="223.98288dp"
android:height="224.54811dp"
android:viewportWidth="223.98288"
android:viewportHeight="224.54811">
<path
android:pathData="m217.071,117.837a100,100 0,0 1,-50 86.603,100 100,0 0,1 -100,0l50,-86.603z"
android:strokeAlpha="0.967625"
android:fillColor="#b3b3b3"
android:strokeColor="#00000000"
android:fillAlpha="0.967625"/>
<path
android:pathData="M61.997,200.214A100,100 0,0 1,11.997 113.611,100 100,0 0,1 61.997,27.009l50,86.602z"
android:strokeAlpha="0.967625"
android:fillColor="#b3b3b3"
android:strokeColor="#00000000"
android:fillAlpha="0.967625"/>
<path
android:pathData="m67.272,24.388a100,100 0,0 1,100 -0,100 100,0 0,1 50,86.602l-100,0z"
android:strokeAlpha="0.967625"
android:fillColor="#b3b3b3"
android:strokeColor="#00000000"
android:fillAlpha="0.967625"/>
<path
android:pathData="m206.574,108.346a100,100 0,0 1,-50 86.603,100 100,0 0,1 -100,0l50,-86.603z"
android:strokeWidth="3"
android:fillColor="#ff00ff"
android:strokeColor="#000000"/>
<path
android:pathData="M51.5,190.723A100,100 0,0 1,1.5 104.12,100 100,0 0,1 51.5,17.518l50,86.602z"
android:strokeWidth="3"
android:fillColor="#800080"
android:strokeColor="#000000"/>
<path
android:pathData="m56.775,14.897a100,100 0,0 1,100 -0,100 100,0 0,1 50,86.602l-100,0z"
android:strokeWidth="3.00011"
android:fillColor="#ff00ff"
android:strokeColor="#000000"/>
</vector>

View File

@@ -0,0 +1,56 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="227.09961dp"
android:height="229.26584dp"
android:viewportWidth="227.09961"
android:viewportHeight="229.26584">
<path
android:pathData="m221.061,121.69a100,100 0,0 1,-69.098 95.106L121.061,121.69Z"
android:strokeWidth="3.00011"
android:fillColor="#b3b3b3"
android:strokeColor="#00000000"/>
<path
android:pathData="M145.01,218.923A100,100 0,0 1,33.207 182.596l80.902,-58.779z"
android:strokeWidth="3.00011"
android:fillColor="#b3b3b3"
android:strokeColor="#00000000"/>
<path
android:pathData="M27.939,175.395A100,100 0,0 1,27.939 57.838L108.841,116.616Z"
android:strokeWidth="3.00011"
android:fillColor="#b3b3b3"
android:strokeColor="#00000000"/>
<path
android:pathData="M32.639,50.913A100,100 0,0 1,144.442 14.586L113.54,109.691Z"
android:strokeWidth="3.00011"
android:fillColor="#b3b3b3"
android:strokeColor="#00000000"/>
<path
android:pathData="m152.553,17.698a100,100 0,0 1,69.098 95.106l-100,0z"
android:strokeWidth="3.00011"
android:fillColor="#b3b3b3"
android:strokeColor="#00000000"/>
<path
android:pathData="m213.717,113.504a100,100 0,0 1,-69.098 95.106l-30.902,-95.106z"
android:strokeWidth="3.00011"
android:fillColor="#ff00ff"
android:strokeColor="#000000"/>
<path
android:pathData="M137.667,210.738A100,100 0,0 1,25.863 174.411L106.765,115.632Z"
android:strokeWidth="3.00011"
android:fillColor="#800080"
android:strokeColor="#000000"/>
<path
android:pathData="M20.596,167.209A100,100 0,0 1,20.596 49.652L101.497,108.431Z"
android:strokeWidth="3.00011"
android:fillColor="#800080"
android:strokeColor="#000000"/>
<path
android:pathData="M25.295,42.727A100,100 0,0 1,137.098 6.4l-30.902,95.106z"
android:strokeWidth="3.00011"
android:fillColor="#800080"
android:strokeColor="#000000"/>
<path
android:pathData="m145.21,9.512a100,100 0,0 1,69.098 95.106l-100,0z"
android:strokeWidth="3.00011"
android:fillColor="#ff00ff"
android:strokeColor="#000000"/>
</vector>

View File

@@ -0,0 +1,56 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="227.09961dp"
android:height="229.26584dp"
android:viewportWidth="227.09961"
android:viewportHeight="229.26584">
<path
android:pathData="m221.061,121.69a100,100 0,0 1,-69.098 95.106L121.061,121.69Z"
android:strokeWidth="3.00011"
android:fillColor="#b3b3b3"
android:strokeColor="#00000000"/>
<path
android:pathData="M145.01,218.923A100,100 0,0 1,33.207 182.596l80.902,-58.779z"
android:strokeWidth="3.00011"
android:fillColor="#b3b3b3"
android:strokeColor="#00000000"/>
<path
android:pathData="M27.939,175.395A100,100 0,0 1,27.939 57.838L108.841,116.616Z"
android:strokeWidth="3.00011"
android:fillColor="#b3b3b3"
android:strokeColor="#00000000"/>
<path
android:pathData="M32.639,50.913A100,100 0,0 1,144.442 14.586L113.54,109.691Z"
android:strokeWidth="3.00011"
android:fillColor="#b3b3b3"
android:strokeColor="#00000000"/>
<path
android:pathData="m152.553,17.698a100,100 0,0 1,69.098 95.106l-100,0z"
android:strokeWidth="3.00011"
android:fillColor="#b3b3b3"
android:strokeColor="#00000000"/>
<path
android:pathData="m213.717,113.504a100,100 0,0 1,-69.098 95.106l-30.902,-95.106z"
android:strokeWidth="3.00011"
android:fillColor="#ff00ff"
android:strokeColor="#000000"/>
<path
android:pathData="M137.667,210.738A100,100 0,0 1,25.863 174.411L106.765,115.632Z"
android:strokeWidth="3.00011"
android:fillColor="#800080"
android:strokeColor="#000000"/>
<path
android:pathData="M20.596,167.209A100,100 0,0 1,20.596 49.652L101.497,108.431Z"
android:strokeWidth="3.00011"
android:fillColor="#800080"
android:strokeColor="#000000"/>
<path
android:pathData="M25.295,42.727A100,100 0,0 1,137.098 6.4l-30.902,95.106z"
android:strokeWidth="3.00011"
android:fillColor="#ff00ff"
android:strokeColor="#000000"/>
<path
android:pathData="m145.21,9.512a100,100 0,0 1,69.098 95.106l-100,0z"
android:strokeWidth="3.00011"
android:fillColor="#ff00ff"
android:strokeColor="#000000"/>
</vector>

View File

@@ -0,0 +1,56 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="227.09961dp"
android:height="229.26584dp"
android:viewportWidth="227.09961"
android:viewportHeight="229.26584">
<path
android:pathData="m221.061,121.69a100,100 0,0 1,-69.098 95.106L121.061,121.69Z"
android:strokeWidth="3.00011"
android:fillColor="#b3b3b3"
android:strokeColor="#00000000"/>
<path
android:pathData="M145.01,218.923A100,100 0,0 1,33.207 182.596l80.902,-58.779z"
android:strokeWidth="3.00011"
android:fillColor="#b3b3b3"
android:strokeColor="#00000000"/>
<path
android:pathData="M27.939,175.395A100,100 0,0 1,27.939 57.838L108.841,116.616Z"
android:strokeWidth="3.00011"
android:fillColor="#b3b3b3"
android:strokeColor="#00000000"/>
<path
android:pathData="M32.639,50.913A100,100 0,0 1,144.442 14.586L113.54,109.691Z"
android:strokeWidth="3.00011"
android:fillColor="#b3b3b3"
android:strokeColor="#00000000"/>
<path
android:pathData="m152.553,17.698a100,100 0,0 1,69.098 95.106l-100,0z"
android:strokeWidth="3.00011"
android:fillColor="#b3b3b3"
android:strokeColor="#00000000"/>
<path
android:pathData="m213.717,113.504a100,100 0,0 1,-69.098 95.106l-30.902,-95.106z"
android:strokeWidth="3.00011"
android:fillColor="#ff00ff"
android:strokeColor="#000000"/>
<path
android:pathData="M137.667,210.738A100,100 0,0 1,25.863 174.411L106.765,115.632Z"
android:strokeWidth="3.00011"
android:fillColor="#800080"
android:strokeColor="#000000"/>
<path
android:pathData="M20.596,167.209A100,100 0,0 1,20.596 49.652L101.497,108.431Z"
android:strokeWidth="3.00011"
android:fillColor="#ff00ff"
android:strokeColor="#000000"/>
<path
android:pathData="M25.295,42.727A100,100 0,0 1,137.098 6.4l-30.902,95.106z"
android:strokeWidth="3.00011"
android:fillColor="#ff00ff"
android:strokeColor="#000000"/>
<path
android:pathData="m145.21,9.512a100,100 0,0 1,69.098 95.106l-100,0z"
android:strokeWidth="3.00011"
android:fillColor="#ff00ff"
android:strokeColor="#000000"/>
</vector>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/fragmentContainer"
android:layout_width="match_parent"
android:layout_height="match_parent">
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:orientation="vertical">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:minHeight="?attr/actionBarSize"
app:title="@string/title_help_recover"
app:titleTextColor="@android:color/white" />
<include layout="@layout/fragment_recovery_custodian_explainer" />
</LinearLayout>

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:orientation="vertical">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:minHeight="?attr/actionBarSize"
app:title="@string/title_help_recover"
app:titleTextColor="@android:color/white" />
<include layout="@layout/fragment_recovery_custodian_error_explainer" />
</LinearLayout>

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:orientation="vertical">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:minHeight="?attr/actionBarSize"
app:title="@string/title_recovery_mode"
app:titleTextColor="@android:color/white" />
<include layout="@layout/fragment_recovery_owner_explainer" />
</LinearLayout>

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:orientation="vertical">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:minHeight="?attr/actionBarSize"
app:title="@string/title_recovery_mode"
app:titleTextColor="@android:color/white" />
<include layout="@layout/fragment_recovery_owner_error_explainer" />
</LinearLayout>

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:orientation="vertical">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:minHeight="?attr/actionBarSize"
app:title="@string/title_recovery_mode"
app:titleTextColor="@android:color/white" />
<include layout="@layout/fragment_recovery_owner_main" />
</LinearLayout>

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:orientation="vertical">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:minHeight="?attr/actionBarSize"
app:title="@string/title_recovery_mode"
app:titleTextColor="@android:color/white" />
<include layout="@layout/fragment_recovery_owner_recovering" />
</LinearLayout>

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:orientation="vertical">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:minHeight="?attr/actionBarSize"
app:title="@string/setup_title"
app:titleTextColor="@android:color/white" />
<include layout="@layout/fragment_start" />
</LinearLayout>

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:orientation="vertical">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:minHeight="?attr/actionBarSize"
app:title="@string/setup_title"
app:titleTextColor="@android:color/white" />
</LinearLayout>

View File

@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/margin_large"
android:paddingTop="@dimen/margin_medium"
android:paddingRight="@dimen/margin_large"
android:paddingBottom="@dimen/margin_medium">
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:text="@string/backup_done_dismiss"
android:textSize="24sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView2" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:gravity="center"
android:text="@string/recovery_account_recovered"
android:textSize="30sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView2" />
<ImageView
android:id="@+id/imageView2"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginStart="32dp"
android:layout_marginLeft="32dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="32dp"
android:layout_marginRight="32dp"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_baseline_done_outline_24" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,130 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingLeft="@dimen/margin_large"
android:paddingTop="@dimen/margin_medium"
android:paddingRight="@dimen/margin_large"
android:paddingBottom="@dimen/margin_medium">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Backup creation" />
<Button
android:id="@+id/buttonSelectThreshold"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_security"
android:text="Select Threshold" />
<Button
android:id="@+id/buttonShardsSent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_security"
android:text="Shards sent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Setup" />
<Button
android:id="@+id/buttonWelcome"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_security"
android:text="Welcome" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Recovery from secrect owner's point of view" />
<Button
android:id="@+id/buttonOwnerRecoveryExplainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_security"
android:text="Explainer" />
<Button
android:id="@+id/buttonOwnerRecoveryReceivedShard"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_security"
android:text="Shard received" />
<Button
android:id="@+id/buttonOwnerRecoveryMain1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_security"
android:text="Main (0 shards)" />
<Button
android:id="@+id/buttonOwnerRecoveryMain2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_security"
android:text="Main (1 shard)" />
<Button
android:id="@+id/buttonOwnerRecoveryMain3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_security"
android:text="Recovering account…" />
<Button
android:id="@+id/buttonOwnerRecoveryAccountRecovered"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_security"
android:text="Account recovered" />
<Button
android:id="@+id/buttonOwnerRecoveryErrorExplainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_security"
android:text="Error" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Recovery from custodian's point of view" />
<Button
android:id="@+id/buttonCustodianRecoveryExplainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_security"
android:text="Explainer" />
<Button
android:id="@+id/buttonCustodianRecoveryErrorExplainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_security"
android:text="Error" />
<Button
android:id="@+id/buttonCustodianRecoveryDone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_security"
android:text="Done" />
</LinearLayout>
</ScrollView>

View File

@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/margin_large"
android:paddingTop="@dimen/margin_medium"
android:paddingRight="@dimen/margin_large"
android:paddingBottom="@dimen/margin_medium">
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:gravity="center"
android:text="@string/custodian_shard_sent"
android:textSize="30sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView2" />
<ImageView
android:id="@+id/imageView2"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginStart="32dp"
android:layout_marginLeft="32dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="32dp"
android:layout_marginRight="32dp"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_baseline_done_outline_24" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/margin_large"
android:paddingTop="@dimen/margin_medium"
android:paddingRight="@dimen/margin_large"
android:paddingBottom="@dimen/margin_medium"
tools:ignore="VectorDrawableCompat"
tools:showIn="@layout/activity_preview_recovery_custodian2">
<TextView
android:id="@+id/textView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:gravity="center"
android:text="@string/custodian_recovery_failed_to_send"
android:textSize="24sp"
app:layout_constraintTop_toTopOf="parent"
tools:layout_editor_absoluteX="16dp" />
<ImageView
android:id="@+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView1"
app:srcCompat="@drawable/qr_code_error" />
<TextView
android:id="@+id/textView2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:gravity="center"
android:text="@string/recovery_helpful_suggestions"
android:textSize="24sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView" />
<Button
android:id="@+id/button"
android:layout_marginTop="24dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/recovery_retry"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView2" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/margin_large"
android:paddingTop="@dimen/margin_medium"
android:paddingRight="@dimen/margin_large"
android:paddingBottom="@dimen/margin_medium"
tools:ignore="VectorDrawableCompat"
tools:showIn="@layout/activity_preview_recovery_custodian1">
<TextView
android:id="@+id/textView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:gravity="center"
android:text="@string/custodian_recovery_explainer"
android:textSize="24sp"
app:layout_constraintTop_toTopOf="parent"
tools:layout_editor_absoluteX="16dp" />
<ImageView
android:id="@+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView"
app:srcCompat="@drawable/qr_code_intro" />
<Button
android:id="@+id/button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:text="@string/custodian_scan_code"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/margin_large"
android:paddingTop="@dimen/margin_medium"
android:paddingRight="@dimen/margin_large"
android:paddingBottom="@dimen/margin_medium"
tools:ignore="VectorDrawableCompat"
tools:showIn="@layout/activity_preview_recovery_owner2">
<TextView
android:id="@+id/textView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:gravity="center"
android:text="@string/recovery_failed_to_receive"
android:textSize="24sp"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView1"
app:srcCompat="@drawable/qr_code_error" />
<TextView
android:id="@+id/textView2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:gravity="center"
android:text="@string/recovery_helpful_suggestions"
android:textSize="24sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView" />
<Button
android:id="@+id/button"
android:layout_marginTop="24dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/recovery_retry"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView2" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/margin_large"
android:paddingTop="@dimen/margin_medium"
android:paddingRight="@dimen/margin_large"
android:paddingBottom="@dimen/margin_medium"
tools:ignore="VectorDrawableCompat"
tools:showIn="@layout/activity_preview_recovery_owner1">
<TextView
android:id="@+id/textView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:gravity="center"
android:text="@string/recovery_explainer"
android:textSize="24sp"
app:layout_constraintTop_toTopOf="parent"
tools:layout_editor_absoluteX="16dp" />
<ImageView
android:id="@+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView"
app:srcCompat="@drawable/qr_code_intro" />
<Button
android:id="@+id/button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:text="@string/recovery_begin"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/margin_large"
android:paddingTop="@dimen/margin_medium"
android:paddingRight="@dimen/margin_large"
android:paddingBottom="@dimen/margin_medium"
tools:ignore="VectorDrawableCompat"
tools:showIn="@layout/activity_preview_recovery_owner3">
<TextView
android:id="@+id/textView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:gravity="center"
android:text="@string/recovery_recovered_shards"
android:textSize="24sp"
app:layout_constraintTop_toTopOf="parent"
tools:layout_editor_absoluteX="16dp" />
<TextView
android:id="@+id/textViewShardCount"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:gravity="center"
android:text="0"
android:textSize="24sp"
app:layout_constraintTop_toBottomOf="@+id/textView"
tools:layout_editor_absoluteX="16dp" />
<Button
android:id="@+id/button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/recovery_scan_qr_code"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/margin_large"
android:paddingTop="@dimen/margin_medium"
android:paddingRight="@dimen/margin_large"
android:paddingBottom="@dimen/margin_medium"
tools:ignore="VectorDrawableCompat"
tools:showIn="@layout/activity_preview_recovery_owner4">
<TextView
android:id="@+id/textView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:gravity="center"
android:text="@string/recovery_recovered_shards"
android:textSize="24sp"
app:layout_constraintTop_toTopOf="parent"
tools:layout_editor_absoluteX="16dp" />
<TextView
android:id="@+id/textViewShardCount"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:gravity="center"
android:text="3"
android:textSize="24sp"
app:layout_constraintTop_toBottomOf="@+id/textView"
tools:layout_editor_absoluteX="16dp" />
<ProgressBar
android:id="@+id/progressBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="144dp"
android:indeterminate="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textViewShardCount" />
<TextView
android:id="@+id/textView3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:gravity="center"
android:text="@string/recovery_recovering_account"
android:textSize="24sp"
app:layout_constraintTop_toBottomOf="@+id/progressBar" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/margin_large"
android:paddingTop="@dimen/margin_medium"
android:paddingRight="@dimen/margin_large"
android:paddingBottom="@dimen/margin_medium">
<TextView
android:id="@+id/title_threshold"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/threshold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<SeekBar
android:id="@+id/seekBar"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:max="5"
android:paddingTop="10dp"
android:progress="3"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/title_threshold" />
<ImageView
android:id="@+id/imageView"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="24dp"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/seekBar"
app:srcCompat="@drawable/ic_pie_2_of_5" />
<TextView
android:id="@+id/textViewMessage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:text="@string/threshold_secure"
android:textSize="16dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/margin_large"
android:paddingTop="@dimen/margin_medium"
android:paddingRight="@dimen/margin_large"
android:paddingBottom="@dimen/margin_medium">
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:text="@string/backup_done_dismiss"
android:textSize="24sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView2" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:gravity="center"
android:text="@string/recovery_shard_received"
android:textSize="30sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView2" />
<ImageView
android:id="@+id/imageView2"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginStart="32dp"
android:layout_marginLeft="32dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="32dp"
android:layout_marginRight="32dp"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_baseline_done_outline_24" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/margin_large"
android:paddingTop="@dimen/margin_medium"
android:paddingRight="@dimen/margin_large"
android:paddingBottom="@dimen/margin_medium">
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:text="@string/backup_done_dismiss"
android:textSize="24sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView2" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="@string/backup_done_info"
android:gravity="center"
android:textSize="30sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView2" />
<ImageView
android:id="@+id/imageView2"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginStart="32dp"
android:layout_marginLeft="32dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="32dp"
android:layout_marginRight="32dp"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_baseline_done_outline_24" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/margin_large"
android:paddingTop="@dimen/margin_medium"
android:paddingRight="@dimen/margin_large"
android:paddingBottom="@dimen/margin_medium"
tools:showIn="@layout/activity_preview_welcome">
<Button
android:id="@+id/buttonSelectThreshold"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_contacts"
android:text="@string/setup_new_account"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/buttonShardsSent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_repeat"
android:text="@string/setup_restore_account"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/buttonSelectThreshold" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:tools="http://schemas.android.com/tools">
<CheckBox
android:id="@+id/checkBox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Bob"
tools:text="@sample/names.json/names/short_names/name" />
</LinearLayout>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<menu
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/action_threshold_defined"
android:icon="@drawable/ic_check_white"
android:title="@string/threshold_defined"
app:showAsAction="always"/>
</menu>

View File

@@ -0,0 +1,82 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- launcher icons, package name, activity name in manifest -->
<string name="app_name" translatable="false">Briar Dark Crystal</string>
<string name="app_package" translatable="false">org.briarproject.briar.android.darkcrystalmockups.debug</string>
<string name="activity_name_mockups">Briar Mockups</string>
<string name="activity_name_distributed_backup">Social Backup</string>
<string name="activity_name_old_distributed_backup">Old Social Backup</string>
<!-- settings -->
<string name="pref_distributed_backup_title">Social backup</string>
<string name="pref_distributed_backup_summary">Backup your account using trusted contacts</string>
<string name="pref_distributed_old_backup_title">Old Social backup</string>
<string name="pref_distributed_old_backup_summary">Information about your most recent social backup</string>
<!-- backup procedure -->
<string name="select_custodians">Select Trusted Contacts:</string>
<string name="select_at_least_n_contacts">Please select at least %d contacts</string>
<string name="select_at_least_n_more_contacts">Please select at least %d more contacts</string>
<string name="threshold">The minimum number of trusted contacts needed to restore your account:</string>
<string name="threshold_secure">Secure</string>
<string name="threshold_insecure">Insecure higher threshold recommended</string>
<!-- the next one does only appear when long-pressing the submit arrow in the app bar-->
<string name="threshold_defined">Choose Threshold</string>
<string name="backup_done_info">Backup pieces sent to trusted contacts</string>
<string name="backup_done_dismiss">Got it</string>
<string name="backup_created">Backup created 1/6/2020</string>
<!-- mockups -->
<string name="title_mockups">Briar DC Mockups</string>
<!-- mockups -->
<string name="title_distributed_backup">Social Backup</string>
<!-- titles for the app bar -->
<string name="title_select_custodians">Select Trusted Contacts</string>
<string name="title_define_threshold">Choose Threshold</string>
<string name="title_recovery_mode">Recovery Mode</string>
<string name="title_help_recover">Help recover account</string>
<!-- setup screen -->
<string name="setup_new_account">Create new account</string>
<string name="setup_restore_account">Restore account from backup</string>
<!-- recovery from the secret owner's POV -->
<string name="recovery_explainer">You need to meet your trusted contacts in-person to receive pieces by scanning QR codes</string>
<string name="recovery_begin">Begin</string>
<string name="recovery_failed_to_receive">Failed to receive backup piece</string>
<string name="recovery_helpful_suggestions">Please check that bluetooth is swtiched on and that no-one but your trusted contact is able to scan the QR code</string>
<string name="recovery_retry">Retry</string>
<string name="recovery_recovered_shards">Recovered backup pieces:</string>
<string name="recovery_scan_qr_code">Scan QR code</string>
<string name="recovery_recovering_account">Recovering account…</string>
<string name="recovery_shard_received">Account backup piece received</string>
<string name="recovery_account_recovered">Account recovered</string>
<!-- recovery from the custodian's POV -->
<string name="custodian_recovery_explainer">You need to meet Alice in-person to transfer backup piece</string>
<string name="custodian_recovery_failed_to_send">Failed to send backup piece</string>
<string name="custodian_scan_code">Scan code</string>
<string name="custodian_shard_sent">Account backup piece transmitted</string>
<!-- conversation menu item -->
<string name="help_recover_account">Help recover account</string>
</resources>