improve exchange activity layout and functionality

pull/5/head
Felix Prahl-Kamps 2019-07-14 19:17:32 +02:00
parent 66d586a546
commit ef37517d20
9 changed files with 179 additions and 398 deletions

View File

@ -38,7 +38,7 @@
</value>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">

View File

@ -25,7 +25,7 @@ dependencies {
// android
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.appcompat:appcompat:1.1.0-beta01'
implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'

View File

@ -28,12 +28,6 @@
<activity
android:name=".activities.HomeActivity"
android:label="@string/app_name" />
<activity
android:name=".activities.ExchangeActivity2"
android:configChanges="orientation|screenSize"
android:parentActivityName=".activities.HomeActivity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.Translucent" />
<activity
android:name=".activities.ExchangeActivity"
android:configChanges="orientation|screenSize"

View File

@ -12,7 +12,7 @@ import android.widget.ImageView;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import androidx.coordinatorlayout.widget.CoordinatorLayout;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;
@ -43,9 +43,9 @@ public class ExchangeActivity extends AppCompatActivity {
private CameraFragment cameraFragment;
private CoordinatorLayout rootLayout;
private ConstraintLayout rootLayout;
private View qrFrame, scanFeedbackView, continueHintView, fragmentContainer;
private TextView scanFeedbackText;
private TextView scanFeedbackText, qrContentInfo;
private ImageView qrCode;
private ImageButton prevButton, nextButton;
@ -57,7 +57,7 @@ public class ExchangeActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_exchange_2);
setContentView(R.layout.activity_exchange);
preferenceManager = PreferenceManager.getInstance(ExchangeActivity.this);
qrCodeGenerator = new QrCodeGenerator(ExchangeActivity.this);
@ -84,6 +84,7 @@ public class ExchangeActivity extends AppCompatActivity {
scanFeedbackView = findViewById(R.id.scanFeedbackView);
scanFeedbackText = findViewById(R.id.scanFeedbackText);
continueHintView = findViewById(R.id.continueHint);
qrContentInfo = findViewById(R.id.qrContentInfo);
prevButton = findViewById(R.id.prevButton);
prevButton.setOnClickListener(onPrevClicked());
@ -130,15 +131,12 @@ public class ExchangeActivity extends AppCompatActivity {
@Override
public void run() {
qrCode.setImageBitmap(bitmap);
qrFrame.setVisibility(View.VISIBLE); // TODO animate
qrFrame.setVisibility(View.VISIBLE);
}
});
}
private void setSyncState(SyncState state) {
Log.d("DEBUG", "current sync state: " + state);
currentSyncState = state;
runOnUiThread(new Runnable() {
@ -151,8 +149,11 @@ public class ExchangeActivity extends AppCompatActivity {
nextButton.setVisibility(View.GONE);
setCameraPreviewEnabled(true);
setReadQrStatus(ReadQrStatus.PENDING);
showQrCode(publicKeyQr);
setReadQrStatus(ReadQrStatus.PENDING);
scanFeedbackText.setText(R.string.scan_qr_hint);
qrContentInfo.setText(R.string.public_key);
break;
case KEY_EXCHANGE_DONE:
prevButton.setImageDrawable(getDrawable(R.drawable.ic_close));
@ -161,8 +162,11 @@ public class ExchangeActivity extends AppCompatActivity {
nextButton.setVisibility(View.VISIBLE);
setCameraPreviewEnabled(false);
setReadQrStatus(ReadQrStatus.SUCCESS);
showQrCode(publicKeyQr);
setReadQrStatus(ReadQrStatus.SUCCESS);
scanFeedbackText.setText(R.string.public_key_received_hint);
qrContentInfo.setText(R.string.public_key);
break;
case DATA_EXCHANGE:
prevButton.setImageDrawable(getDrawable(R.drawable.ic_arrow_back));
@ -170,8 +174,11 @@ public class ExchangeActivity extends AppCompatActivity {
nextButton.setVisibility(View.GONE);
setCameraPreviewEnabled(true);
setReadQrStatus(ReadQrStatus.PENDING);
showQrCode(dataQr);
setReadQrStatus(ReadQrStatus.PENDING);
scanFeedbackText.setText(R.string.scan_qr_hint);
qrContentInfo.setText(R.string.sync_information);
break;
case DATA_EXCHANGE_DONE:
prevButton.setImageDrawable(getDrawable(R.drawable.ic_arrow_back));
@ -180,8 +187,11 @@ public class ExchangeActivity extends AppCompatActivity {
nextButton.setVisibility(View.VISIBLE);
setCameraPreviewEnabled(false);
setReadQrStatus(ReadQrStatus.SUCCESS);
showQrCode(dataQr);
setReadQrStatus(ReadQrStatus.SUCCESS);
scanFeedbackText.setText(R.string.sync_info_received_hint);
qrContentInfo.setText(R.string.public_key);
break;
}
}
@ -213,29 +223,22 @@ public class ExchangeActivity extends AppCompatActivity {
break;
}
runOnUiThread(new Runnable() {
@Override
public void run() {
scanFeedbackText.setCompoundDrawablesWithIntrinsicBounds(drawable, null, null, null);
scanFeedbackText.setCompoundDrawableTintList(ColorStateList.valueOf(color));
scanFeedbackText.setCompoundDrawablesWithIntrinsicBounds(drawable, null, null, null);
scanFeedbackText.setCompoundDrawableTintList(ColorStateList.valueOf(color));
if (currentReadQrStatus == ReadQrStatus.SUCCESS) {
continueHintView.setVisibility(View.VISIBLE);
if (currentReadQrStatus == ReadQrStatus.SUCCESS) {
continueHintView.setVisibility(View.VISIBLE);
scanFeedbackView.setBackgroundTintList(ColorStateList.valueOf(getColor(R.color.white)));
qrFrame.setBackgroundTintList(ColorStateList.valueOf(getColor(R.color.white)));
continueHintView.setBackgroundTintList(ColorStateList.valueOf(getColor(R.color.white)));
scanFeedbackView.setBackgroundTintList(ColorStateList.valueOf(getColor(R.color.white)));
qrFrame.setBackgroundTintList(ColorStateList.valueOf(getColor(R.color.white)));
fragmentContainer.animate().alpha(0).setDuration(250).start();
} else {
continueHintView.setVisibility(View.GONE);
scanFeedbackView.setBackgroundTintList(ColorStateList.valueOf(getColor(R.color.white_80)));
qrFrame.setBackgroundTintList(ColorStateList.valueOf(getColor(R.color.white_80)));
fragmentContainer.animate().alpha(0).setDuration(250).start();
} else {
fragmentContainer.animate().alpha(1).setDuration(250).start();
continueHintView.setBackgroundTintList(ColorStateList.valueOf(getColor(R.color.white_80)));
scanFeedbackView.setBackgroundTintList(ColorStateList.valueOf(getColor(R.color.white_80)));
qrFrame.setBackgroundTintList(ColorStateList.valueOf(getColor(R.color.white_80)));
}
}
});
fragmentContainer.animate().alpha(1).setDuration(250).start();
}
}
private void setCameraPreviewEnabled(boolean enabled) {

View File

@ -1,129 +0,0 @@
package lu.circl.mispbump.activities;
import android.content.res.ColorStateList;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.view.View;
import android.view.animation.AnticipateOvershootInterpolator;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;
import lu.circl.mispbump.R;
import lu.circl.mispbump.auxiliary.PreferenceManager;
import lu.circl.mispbump.auxiliary.QrCodeGenerator;
import lu.circl.mispbump.fragments.CameraFragment;
import lu.circl.mispbump.models.UploadInformation;
import lu.circl.mispbump.security.DiffieHellman;
public class ExchangeActivity2 extends AppCompatActivity {
private PreferenceManager preferenceManager;
private QrCodeGenerator qrCodeGenerator;
private DiffieHellman diffieHellman;
private UploadInformation uploadInformation;
private CameraFragment cameraFragment;
private Bitmap publicKeyQr, dataQr;
private TextView titleView, hintView;
private View fragmentContainer;
private ImageView qrCode;
private ImageButton prevButton, nextButton, qrInfoButton;
private boolean isDone = false;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_exchange_2);
qrCodeGenerator = new QrCodeGenerator(ExchangeActivity2.this);
initViews();
initCamera();
}
private void initViews() {
titleView = findViewById(R.id.title);
fragmentContainer = findViewById(R.id.fragmentContainer);
qrCode = findViewById(R.id.qrCode);
qrCode.setImageBitmap(qrCodeGenerator.generateQrCode("Sample content"));
prevButton = findViewById(R.id.prevButton);
prevButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
isDone = !isDone;
toggleLayoutChange(isDone);
}
});
nextButton = findViewById(R.id.nextButton);
qrInfoButton = findViewById(R.id.qrInfoButton);
}
private void initCamera() {
FragmentManager fragmentManager = getSupportFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
cameraFragment = new CameraFragment();
fragmentTransaction.add(R.id.fragmentContainer, cameraFragment, CameraFragment.class.getSimpleName());
fragmentTransaction.commit();
}
private void toggleLayoutChange(final boolean done) {
final View doneText = findViewById(R.id.scanFeedbackView);
View constraintLayout = findViewById(R.id.qrFrame);
if (done) {
fragmentContainer.animate().alpha(0f).setDuration(250).start();
doneText.setVisibility(View.VISIBLE);
doneText.setBackgroundTintList(ColorStateList.valueOf(getColor(R.color.white)));
// doneText.setAlpha(0);
// doneText.setTranslationY(100);
// doneText.animate()
// .alpha(1)
// .translationY(0)
// .setInterpolator(new DecelerateInterpolator())
// .start();
//
// constraintLayout.setBackgroundTintList(ColorStateList.valueOf(getColor(R.color.white)));
// constraintLayout.animate().translationY(-50).setDuration(250).start();
nextButton.setTranslationX(200);
nextButton.animate()
.translationX(0)
.setInterpolator(new AnticipateOvershootInterpolator())
.setDuration(250).start();
} else {
fragmentContainer.animate().alpha(1f).setDuration(250).start();
doneText.setVisibility(View.GONE);
doneText.setBackgroundTintList(ColorStateList.valueOf(getColor(R.color.white_80)));
// doneText.animate()
// .alpha(0)
// .translationY(100)
// .start();
//
// constraintLayout.setBackgroundTintList(ColorStateList.valueOf(getColor(R.color.white_80)));
// constraintLayout.animate().translationY(0).setDuration(250).start();
nextButton.setTranslationX(0);
nextButton.animate().translationX(200).setDuration(250).start();
}
}
}

View File

@ -1,98 +1,178 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout
<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/rootLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:background="@color/colorPrimaryDark">
<FrameLayout
android:id="@+id/fragmentContainer"
android:layout_width="match_parent"
android:layout_height="match_parent" />
android:layout_height="match_parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/qrFrame"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@drawable/rect_rounded"
android:backgroundTint="#99FFFFFF"
android:gravity="center_vertical"
android:animateLayoutChanges="true"
android:orientation="vertical"
android:padding="8dp">
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="25dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:gravity="center"
app:layout_constraintBottom_toTopOf="@id/navbar_bottom">
<ImageView
android:id="@+id/qrCode"
android:src="@drawable/rect_rounded"
android:tint="@color/colorIconDark"
android:layout_width="match_parent"
android:layout_height="256dp"
android:contentDescription="@string/qr_code" />
<TextView
android:id="@+id/qrInfo"
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/qrFrame"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableStart="@drawable/ic_info_outline"
android:drawablePadding="8dp"
android:drawableTint="@color/status_amber"
android:gravity="center_vertical"
android:padding="8dp"
android:text="@string/activity_exchange_scan_partner_qr_hint"
android:textColor="@color/black" />
android:layout_marginStart="32dp"
android:layout_marginEnd="32dp"
android:layout_marginBottom="16dp"
android:background="@drawable/rect_rounded"
android:backgroundTint="@color/white_80"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/navbar_bottom">
<TextView
android:id="@+id/qrInfoStatic"
<TextView
android:id="@+id/qrContentInfo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/public_key"
android:textAlignment="center"
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"
android:textColor="@color/black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/qrCode" />
<ImageButton
android:id="@+id/qrInfoButton"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:src="@drawable/ic_info_outline"
android:tint="@color/black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<ImageView
android:id="@+id/qrCode"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp"
android:layout_marginEnd="12dp"
android:src="@color/white"
app:layout_constraintBottom_toTopOf="@+id/qrInfoButton"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
android:id="@+id/scanFeedbackView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableStart="@drawable/ic_info_outline"
android:drawablePadding="8dp"
android:drawableTint="@color/colorIconDark"
android:gravity="center_vertical"
android:lines="2"
android:padding="8dp"
android:text="@string/activity_exchange_continue_if_scanned"
android:textColor="@color/black" />
android:layout_marginStart="32dp"
android:layout_marginEnd="32dp"
android:layout_marginBottom="16dp"
android:background="@drawable/rect_rounded"
android:backgroundTint="@color/white_80">
<TextView
android:id="@+id/scanFeedbackText"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp"
android:drawableStart="@drawable/ic_check_outline"
android:drawableTint="@color/status_green"
android:drawablePadding="8dp"
android:textAppearance="@style/TextAppearance.MaterialComponents.Body2"
android:gravity="center_vertical"
tools:text="Public key received"/>
</LinearLayout>
<LinearLayout
android:visibility="gone"
android:id="@+id/continueHint"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginEnd="32dp"
android:background="@drawable/rect_rounded"
android:backgroundTint="@color/white">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp"
android:drawableStart="@drawable/ic_info_outline"
android:drawableTint="@color/status_amber"
android:drawablePadding="8dp"
android:textAppearance="@style/TextAppearance.MaterialComponents.Body2"
android:gravity="center_vertical"
android:text="Continue if your partner scanned this QR code"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/navbar_bottom"
android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="56dp"
android:layout_gravity="bottom"
android:background="@drawable/rect_rounded_top"
android:backgroundTint="@color/colorPrimary"
android:orientation="horizontal">
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
<ImageButton
android:id="@+id/prevButton"
android:layout_width="56dp"
android:layout_height="56dp"
android:background="?attr/selectableItemBackground"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/button_prev"
android:padding="8dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_arrow_back"
android:contentDescription="@string/button_prev" />
app:srcCompat="@drawable/ic_arrow_back" />
<View
<TextView
android:visibility="invisible"
android:id="@+id/hint"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1" />
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:layout_weight="1"
android:text="Scan each others QR codes"
android:textAlignment="center"
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"
android:textColor="@color/white" />
<ImageButton
android:id="@+id/nextButton"
android:layout_width="56dp"
android:layout_height="56dp"
android:background="?attr/selectableItemBackground"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/button_continue"
android:padding="8dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_arrow_forward"
android:contentDescription="@string/button_continue" />
app:srcCompat="@drawable/ic_arrow_forward" />
</LinearLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -1,177 +0,0 @@
<?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/rootLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorPrimaryDark">
<FrameLayout
android:id="@+id/fragmentContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:animateLayoutChanges="true"
android:orientation="vertical"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:gravity="center"
app:layout_constraintBottom_toTopOf="@id/navbar_bottom">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/qrFrame"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginEnd="32dp"
android:layout_marginBottom="16dp"
android:background="@drawable/rect_rounded"
android:backgroundTint="@color/white_80"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/navbar_bottom">
<TextView
android:id="@+id/qrInfoText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Public Key"
android:textAlignment="center"
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"
android:textColor="@color/black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/qrCode" />
<ImageButton
android:id="@+id/qrInfoButton"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:src="@drawable/ic_info_outline"
android:tint="@color/black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<ImageView
android:id="@+id/qrCode"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp"
android:layout_marginEnd="12dp"
android:src="@color/white"
app:layout_constraintBottom_toTopOf="@+id/qrInfoButton"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
android:id="@+id/scanFeedbackView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginEnd="32dp"
android:layout_marginBottom="16dp"
android:background="@drawable/rect_rounded"
android:backgroundTint="@color/white_80">
<TextView
android:id="@+id/scanFeedbackText"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp"
android:drawableStart="@drawable/ic_check_outline"
android:drawableTint="@color/status_green"
android:drawablePadding="8dp"
android:textAppearance="@style/TextAppearance.MaterialComponents.Body2"
android:gravity="center_vertical"
android:text="Public key received"/>
</LinearLayout>
<LinearLayout
android:visibility="gone"
android:id="@+id/continueHint"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginEnd="32dp"
android:background="@drawable/rect_rounded"
android:backgroundTint="@color/white_80">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp"
android:drawableStart="@drawable/ic_info_outline"
android:drawableTint="@color/status_amber"
android:drawablePadding="8dp"
android:textAppearance="@style/TextAppearance.MaterialComponents.Body2"
android:gravity="center_vertical"
android:text="Continue if your partner scanned this QR code"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/navbar_bottom"
android:layout_width="0dp"
android:layout_height="56dp"
android:background="@drawable/rect_rounded_top"
android:backgroundTint="@color/colorPrimary"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
<ImageButton
android:id="@+id/prevButton"
android:layout_width="56dp"
android:layout_height="56dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/button_prev"
android:padding="8dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_arrow_back" />
<TextView
android:visibility="invisible"
android:id="@+id/hint"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:layout_weight="1"
android:text="Scan each others QR codes"
android:textAlignment="center"
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"
android:textColor="@color/white" />
<ImageButton
android:id="@+id/nextButton"
android:layout_width="56dp"
android:layout_height="56dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/button_continue"
android:padding="8dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_arrow_forward" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -39,4 +39,9 @@
<string name="upload_action_add_org">Organisation hinzufügen</string>
<string name="upload_action_add_server">Server hinzufügen</string>
<string name="upload_action_add_user">Benutzer hinzufügen</string>
<string name="public_key">Öffentlicher Schlüssel</string>
<string name="scan_qr_hint">Scannen Sie den QR code ihres Partners</string>
<string name="public_key_received_hint">Öffentlicher Schlüssel empfangen</string>
<string name="sync_info_received_hint">Synchronisations-Informationen empfangen</string>
<string name="sync_information">Synchronisations-Informationen</string>
</resources>

View File

@ -45,4 +45,9 @@
<string name="upload_action_add_org">Add organisation</string>
<string name="upload_action_add_user">Add sync user</string>
<string name="upload_action_add_server">Add sync server</string>
<string name="public_key">Public Key</string>
<string name="scan_qr_hint">Scan your partners QR code</string>
<string name="public_key_received_hint">Received public key</string>
<string name="sync_info_received_hint">Received sync information</string>
<string name="sync_information">Sync Information</string>
</resources>