Merge branch '2076-revise-transfer-data-explanation' into 'master'

Revise removable drive ui after usability testing

Closes #2076

See merge request briar/briar!1530
This commit is contained in:
Torsten Grote
2021-08-31 12:11:11 +00:00
4 changed files with 31 additions and 4 deletions

View File

@@ -11,6 +11,7 @@ import android.widget.ScrollView;
import org.briarproject.bramble.api.nullsafety.MethodsNotNullByDefault;
import org.briarproject.bramble.api.nullsafety.ParametersNotNullByDefault;
import org.briarproject.briar.R;
import org.briarproject.briar.android.widget.OnboardingFullDialogFragment;
import javax.inject.Inject;
@@ -51,6 +52,10 @@ public class ChooserFragment extends Fragment {
container, false);
scrollView = (ScrollView) v;
Button buttonLearnMore = v.findViewById(R.id.buttonLearnMore);
buttonLearnMore.setOnClickListener(e -> showLearnMoreDialog());
Button sendButton = v.findViewById(R.id.sendButton);
sendButton.setOnClickListener(i -> viewModel.startSendData());
@@ -75,4 +80,10 @@ public class ChooserFragment extends Fragment {
}
}
private void showLearnMoreDialog() {
OnboardingFullDialogFragment.newInstance(
R.string.removable_drive_menu_title,
R.string.removable_drive_explanation
).show(getChildFragmentManager(), OnboardingFullDialogFragment.TAG);
}
}

View File

@@ -20,6 +20,7 @@
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:scrollbars="vertical"
android:fillViewport="true">
<androidx.constraintlayout.widget.ConstraintLayout

View File

@@ -31,14 +31,28 @@
android:layout_height="wrap_content"
android:layout_marginHorizontal="@dimen/margin_xlarge"
android:layout_marginTop="@dimen/margin_xlarge"
android:layout_marginBottom="@dimen/margin_large"
android:text="@string/removable_drive_intro"
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"
app:layout_constraintBottom_toTopOf="@+id/sendButton"
app:layout_constraintBottom_toTopOf="@+id/buttonLearnMore"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView" />
<Button
android:id="@+id/buttonLearnMore"
style="@style/BriarButtonFlat.Positive"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/margin_large"
android:padding="16dp"
android:text="@string/learn_more"
android:textAllCaps="false"
android:textSize="14sp"
app:layout_constraintBottom_toTopOf="@id/sendButton"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/introView" />
<Button
android:id="@+id/sendButton"
style="@style/BriarButton"

View File

@@ -768,8 +768,9 @@
<!-- Transfer Data via Removable Drives -->
<string name="removable_drive_menu_title">Transfer data</string>
<string name="removable_drive_intro">You can send encrypted messages to your contact using removable storage such as USB flash drives or SD cards.\n\nIf your contact has sent you a removable drive containing encrypted messages, you can import the messages into Briar by using the receive button below.</string>
<string name="removable_drive_menu_title">Connect via Removable Drive</string>
<string name="removable_drive_intro">If you can\'t connect to your contact via the Internet, Wi-Fi or Bluetooth, Briar can also transfer messages on a removable drive such as a USB stick or an SD card.</string>
<string name="removable_drive_explanation">If you can\'t connect to your contact via the Internet, Wi-Fi or Bluetooth, Briar can also transfer messages on a removable drive such as a USB stick or an SD card.\n\nWhen you use the \"Send Data\" button, any data that\'s waiting to be sent to the contact will be written to the removable drive. This includes private messages, attachments, blogs, forums and private groups.\n\nEverything will be encrypted before it is written to the removable drive.\n\nWhen your contact receives the removable drive, they can use the \"Receive Data\" button to import the messages into Briar.</string>
<string name="removable_drive_title_send">Send data</string>
<string name="removable_drive_title_receive">Receive data</string>
<string name="removable_drive_send_intro">Tap the button below to create a new file containing the encrypted messages. You can choose where the file will be saved.\n\nIf you want to save the file on a removable drive, insert the drive now.</string>