mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-18 05:39:53 +01:00
Make QR code another view on the invite link
This commit is contained in:
@@ -102,12 +102,12 @@ public class ContactInviteInputActivity extends BriarActivity implements
|
|||||||
return link.matches("^(briar://)?[A-Z2-7]{64}$");
|
return link.matches("^(briar://)?[A-Z2-7]{64}$");
|
||||||
}
|
}
|
||||||
|
|
||||||
void showLink() {
|
void showLink(@Nullable String link) {
|
||||||
showInitialFragment(ContactLinkInputFragment.newInstance(null));
|
showInitialFragment(ContactLinkInputFragment.newInstance(link));
|
||||||
}
|
}
|
||||||
|
|
||||||
void showCode() {
|
void showCode() {
|
||||||
showInitialFragment(new ContactQrCodeInputFragment());
|
showNextFragment(new ContactQrCodeInputFragment());
|
||||||
}
|
}
|
||||||
|
|
||||||
void showAlias() {
|
void showAlias() {
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ public class ContactInviteOutputActivity extends BriarActivity implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
void showCode() {
|
void showCode() {
|
||||||
showInitialFragment(new ContactQrCodeOutputFragment());
|
showNextFragment(new ContactQrCodeOutputFragment());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,14 +16,11 @@ import org.briarproject.bramble.api.nullsafety.NotNullByDefault;
|
|||||||
import org.briarproject.briar.R;
|
import org.briarproject.briar.R;
|
||||||
import org.briarproject.briar.android.activity.ActivityComponent;
|
import org.briarproject.briar.android.activity.ActivityComponent;
|
||||||
import org.briarproject.briar.android.fragment.BaseFragment;
|
import org.briarproject.briar.android.fragment.BaseFragment;
|
||||||
import org.briarproject.briar.android.navdrawer.NavDrawerActivity;
|
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
import static android.content.ClipDescription.MIMETYPE_TEXT_PLAIN;
|
import static android.content.ClipDescription.MIMETYPE_TEXT_PLAIN;
|
||||||
import static android.content.Context.CLIPBOARD_SERVICE;
|
import static android.content.Context.CLIPBOARD_SERVICE;
|
||||||
import static android.content.Intent.FLAG_ACTIVITY_CLEAR_TOP;
|
|
||||||
import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK;
|
|
||||||
import static java.util.Objects.requireNonNull;
|
import static java.util.Objects.requireNonNull;
|
||||||
|
|
||||||
@NotNullByDefault
|
@NotNullByDefault
|
||||||
@@ -115,8 +112,9 @@ public class ContactLinkInputFragment extends BaseFragment
|
|||||||
public void onTextChanged(CharSequence s, int start, int before,
|
public void onTextChanged(CharSequence s, int start, int before,
|
||||||
int count) {
|
int count) {
|
||||||
if (isBriarLink(linkInput.getText()) && getActivity() != null) {
|
if (isBriarLink(linkInput.getText()) && getActivity() != null) {
|
||||||
linkInput.setText(null);
|
updateAddButtonState();
|
||||||
((ContactInviteInputActivity) getActivity()).showAlias();
|
// linkInput.setText(null);
|
||||||
|
// ((ContactInviteInputActivity) getActivity()).showAlias();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -136,17 +134,17 @@ public class ContactLinkInputFragment extends BaseFragment
|
|||||||
|
|
||||||
private void onAddButtonClicked() {
|
private void onAddButtonClicked() {
|
||||||
if (getActivity() == null || getContext() == null) return;
|
if (getActivity() == null || getContext() == null) return;
|
||||||
;
|
|
||||||
|
|
||||||
((ContactInviteInputActivity) getActivity())
|
((ContactInviteInputActivity) getActivity())
|
||||||
.addFakeRequest(contactNameInput.getText().toString());
|
.addFakeRequest(contactNameInput.getText().toString());
|
||||||
|
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(getContext(),
|
AlertDialog.Builder builder = new AlertDialog.Builder(getContext(),
|
||||||
R.style.BriarDialogTheme_Neutral);
|
R.style.BriarDialogTheme_Neutral);
|
||||||
|
builder.setTitle("Contact requested");
|
||||||
builder.setMessage(getString(R.string.add_contact_link_question));
|
builder.setMessage(getString(R.string.add_contact_link_question));
|
||||||
builder.setPositiveButton(R.string.yes, (dialog, which) -> {
|
builder.setPositiveButton(R.string.yes, (dialog, which) -> {
|
||||||
Intent intent = new Intent(getContext(), NavDrawerActivity.class);
|
Intent intent = new Intent(getContext(), PendingRequestsActivity.class);
|
||||||
intent.setFlags(FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_CLEAR_TOP);
|
// intent.setFlags(FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_CLEAR_TOP);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
finish();
|
finish();
|
||||||
});
|
});
|
||||||
@@ -159,5 +157,4 @@ public class ContactLinkInputFragment extends BaseFragment
|
|||||||
builder.show();
|
builder.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import android.util.Log;
|
|||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.Button;
|
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import com.google.zxing.Result;
|
import com.google.zxing.Result;
|
||||||
@@ -51,7 +50,7 @@ public class ContactQrCodeInputFragment extends BaseFragment
|
|||||||
@Nullable ViewGroup container,
|
@Nullable ViewGroup container,
|
||||||
@Nullable Bundle savedInstanceState) {
|
@Nullable Bundle savedInstanceState) {
|
||||||
|
|
||||||
getActivity().setTitle(R.string.open_link_title);
|
getActivity().setTitle("Scan QR Code");
|
||||||
|
|
||||||
View v = inflater.inflate(R.layout.fragment_contact_qr_code_input,
|
View v = inflater.inflate(R.layout.fragment_contact_qr_code_input,
|
||||||
container, false);
|
container, false);
|
||||||
@@ -59,9 +58,9 @@ public class ContactQrCodeInputFragment extends BaseFragment
|
|||||||
cameraView = v.findViewById(R.id.camera_view);
|
cameraView = v.findViewById(R.id.camera_view);
|
||||||
|
|
||||||
|
|
||||||
Button enterLinkButton = v.findViewById(R.id.enterLinkButton);
|
// Button enterLinkButton = v.findViewById(R.id.enterLinkButton);
|
||||||
enterLinkButton.setOnClickListener(view ->
|
// enterLinkButton.setOnClickListener(view ->
|
||||||
((ContactInviteInputActivity) getActivity()).showLink());
|
// ((ContactInviteInputActivity) getActivity()).showLink());
|
||||||
|
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
@@ -148,13 +147,13 @@ public class ContactQrCodeInputFragment extends BaseFragment
|
|||||||
builder.setPositiveButton(R.string.ok,
|
builder.setPositiveButton(R.string.ok,
|
||||||
UiUtils.getGoToSettingsListener(getContext()));
|
UiUtils.getGoToSettingsListener(getContext()));
|
||||||
builder.setNegativeButton(R.string.cancel,
|
builder.setNegativeButton(R.string.cancel,
|
||||||
(dialog, which) -> showLink());
|
(dialog, which) -> showLink(null));
|
||||||
builder.show();
|
builder.show();
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(getContext(),
|
Toast.makeText(getContext(),
|
||||||
R.string.permission_camera_denied_toast,
|
R.string.permission_camera_denied_toast,
|
||||||
LENGTH_LONG).show();
|
LENGTH_LONG).show();
|
||||||
showLink();
|
showLink(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -164,9 +163,9 @@ public class ContactQrCodeInputFragment extends BaseFragment
|
|||||||
requestPermissions(new String[] {CAMERA}, REQUEST_PERMISSION_CAMERA);
|
requestPermissions(new String[] {CAMERA}, REQUEST_PERMISSION_CAMERA);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showLink() {
|
private void showLink(@Nullable String link) {
|
||||||
if (getActivity() != null)
|
if (getActivity() != null)
|
||||||
((ContactInviteInputActivity) getActivity()).showLink();
|
((ContactInviteInputActivity) getActivity()).showLink(link);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -175,7 +174,7 @@ public class ContactQrCodeInputFragment extends BaseFragment
|
|||||||
if (getActivity() != null &&
|
if (getActivity() != null &&
|
||||||
((ContactInviteInputActivity) getActivity())
|
((ContactInviteInputActivity) getActivity())
|
||||||
.isBriarLink(result.getText())) {
|
.isBriarLink(result.getText())) {
|
||||||
((ContactInviteInputActivity) getActivity()).showAlias();
|
showLink(result.getText());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public class ContactQrCodeOutputFragment extends BaseFragment
|
|||||||
@Nullable ViewGroup container,
|
@Nullable ViewGroup container,
|
||||||
@Nullable Bundle savedInstanceState) {
|
@Nullable Bundle savedInstanceState) {
|
||||||
|
|
||||||
getActivity().setTitle(R.string.send_code_title);
|
getActivity().setTitle("Show my QR Code");
|
||||||
|
|
||||||
View v = inflater.inflate(R.layout.fragment_contact_qr_code_output,
|
View v = inflater.inflate(R.layout.fragment_contact_qr_code_output,
|
||||||
container, false);
|
container, false);
|
||||||
|
|||||||
5
briar-android/src/main/res/drawable/ic_content_copy.xml
Normal file
5
briar-android/src/main/res/drawable/ic_content_copy.xml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||||
|
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||||
|
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="#FF000000" android:pathData="M16,1L4,1c-1.1,0 -2,0.9 -2,2v14h2L4,3h12L16,1zM19,5L8,5c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h11c1.1,0 2,-0.9 2,-2L21,7c0,-1.1 -0.9,-2 -2,-2zM19,21L8,21L8,7h11v14z"/>
|
||||||
|
</vector>
|
||||||
5
briar-android/src/main/res/drawable/ic_person.xml
Normal file
5
briar-android/src/main/res/drawable/ic_person.xml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||||
|
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||||
|
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="#FF000000" android:pathData="M12,12c2.21,0 4,-1.79 4,-4s-1.79,-4 -4,-4 -4,1.79 -4,4 1.79,4 4,4zM12,14c-2.67,0 -8,1.34 -8,4v2h16v-2c0,-2.66 -5.33,-4 -8,-4z"/>
|
||||||
|
</vector>
|
||||||
@@ -11,10 +11,12 @@
|
|||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="@dimen/margin_large"
|
android:layout_margin="@dimen/margin_large"
|
||||||
|
android:drawableLeft="@drawable/ic_person"
|
||||||
|
android:drawablePadding="8dp"
|
||||||
|
android:drawableTint="?attr/colorControlNormal"
|
||||||
android:hint="@string/contact_name_hint"
|
android:hint="@string/contact_name_hint"
|
||||||
android:importantForAutofill="no"
|
android:importantForAutofill="no"
|
||||||
android:inputType="text|textCapWords"
|
android:inputType="text|textCapWords"
|
||||||
android:visibility="gone"
|
|
||||||
app:layout_constraintBottom_toTopOf="@id/linkInput"
|
app:layout_constraintBottom_toTopOf="@id/linkInput"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
@@ -25,15 +27,18 @@
|
|||||||
android:id="@+id/linkInput"
|
android:id="@+id/linkInput"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
android:layout_marginLeft="@dimen/margin_large"
|
android:layout_marginLeft="@dimen/margin_large"
|
||||||
|
android:layout_marginRight="8dp"
|
||||||
android:layout_marginStart="@dimen/margin_large"
|
android:layout_marginStart="@dimen/margin_large"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
|
android:drawableLeft="@drawable/ic_link"
|
||||||
|
android:drawablePadding="8dp"
|
||||||
|
android:drawableTint="?attr/colorControlNormal"
|
||||||
android:hint="@string/contact_link_hint"
|
android:hint="@string/contact_link_hint"
|
||||||
android:importantForAutofill="no"
|
android:importantForAutofill="no"
|
||||||
android:inputType="textUri"
|
android:inputType="textUri"
|
||||||
app:layout_constraintBottom_toTopOf="@id/addButton"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintEnd_toStartOf="@id/pasteButton"
|
|
||||||
app:layout_constraintHorizontal_bias="0.8"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/contactNameInput"/>
|
app:layout_constraintTop_toBottomOf="@id/contactNameInput"/>
|
||||||
|
|
||||||
@@ -42,16 +47,36 @@
|
|||||||
style="@style/BriarButtonFlat.Positive"
|
style="@style/BriarButtonFlat.Positive"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="8dp"
|
android:layout_marginLeft="8dp"
|
||||||
android:layout_marginRight="8dp"
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
android:drawableLeft="@drawable/ic_content_paste"
|
android:drawableLeft="@drawable/ic_content_paste"
|
||||||
android:drawablePadding="8dp"
|
android:drawablePadding="8dp"
|
||||||
android:drawableTint="@color/briar_text_link"
|
android:drawableTint="@color/briar_text_link"
|
||||||
android:text="@string/paste_button"
|
android:text="@string/paste_button"
|
||||||
app:layout_constraintBottom_toBottomOf="@id/linkInput"
|
app:layout_constraintEnd_toStartOf="@+id/scanCodeButton"
|
||||||
|
app:layout_constraintHorizontal_bias="0.5"
|
||||||
|
app:layout_constraintHorizontal_chainStyle="spread"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/linkInput"/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/scanCodeButton"
|
||||||
|
style="@style/BriarButtonFlat.Positive"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:layout_marginLeft="8dp"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:drawableLeft="@drawable/ic_qr_code"
|
||||||
|
android:drawablePadding="8dp"
|
||||||
|
android:drawableTint="@color/briar_button_text_positive"
|
||||||
|
android:text="Scan Code"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@id/linkInput"
|
app:layout_constraintHorizontal_bias="0.5"
|
||||||
app:layout_constraintTop_toTopOf="@id/linkInput"/>
|
app:layout_constraintStart_toEndOf="@+id/pasteButton"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/linkInput"/>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/addButton"
|
android:id="@+id/addButton"
|
||||||
@@ -59,43 +84,13 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="@dimen/margin_large"
|
android:layout_margin="@dimen/margin_large"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
android:enabled="false"
|
android:enabled="false"
|
||||||
android:text="@string/add_contact_button"
|
android:text="@string/add_contact_button"
|
||||||
|
|
||||||
android:visibility="gone"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.75"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/linkInput"
|
app:layout_constraintTop_toBottomOf="@+id/pasteButton"
|
||||||
tools:enabled="true"/>
|
tools:enabled="true"/>
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/textView3"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginEnd="8dp"
|
|
||||||
android:layout_marginLeft="8dp"
|
|
||||||
android:layout_marginRight="8dp"
|
|
||||||
android:layout_marginStart="8dp"
|
|
||||||
android:layout_marginTop="16dp"
|
|
||||||
android:text="or"
|
|
||||||
android:textSize="18sp"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/addButton"/>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/scanCodeButton"
|
|
||||||
style="@style/BriarButton"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginEnd="8dp"
|
|
||||||
android:layout_marginStart="8dp"
|
|
||||||
android:layout_marginTop="16dp"
|
|
||||||
android:drawableLeft="@drawable/ic_qr_code"
|
|
||||||
android:drawablePadding="8dp"
|
|
||||||
android:text="Scan QR Code"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/textView3"/>
|
|
||||||
|
|
||||||
</android.support.constraint.ConstraintLayout>
|
</android.support.constraint.ConstraintLayout>
|
||||||
|
|||||||
@@ -24,11 +24,14 @@
|
|||||||
android:id="@+id/linkView"
|
android:id="@+id/linkView"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="@dimen/margin_large"
|
android:layout_marginEnd="@dimen/margin_large"
|
||||||
|
android:layout_marginStart="@dimen/margin_large"
|
||||||
android:textIsSelectable="true"
|
android:textIsSelectable="true"
|
||||||
|
android:padding="8dp"
|
||||||
|
android:background="@color/briar_white"
|
||||||
android:textSize="18sp"
|
android:textSize="18sp"
|
||||||
android:typeface="monospace"
|
android:typeface="monospace"
|
||||||
app:layout_constraintBottom_toTopOf="@id/copyButton"
|
app:layout_constraintBottom_toTopOf="@+id/copyButton"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/linkIntro"
|
app:layout_constraintTop_toBottomOf="@id/linkIntro"
|
||||||
@@ -39,51 +42,45 @@
|
|||||||
style="@style/BriarButtonFlat.Positive"
|
style="@style/BriarButtonFlat.Positive"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="@dimen/margin_large"
|
android:layout_marginTop="@dimen/margin_large"
|
||||||
|
android:drawableLeft="@drawable/ic_content_copy"
|
||||||
|
android:drawablePadding="8dp"
|
||||||
|
android:drawableTint="@color/briar_button_text_positive"
|
||||||
android:text="@string/copy_button"
|
android:text="@string/copy_button"
|
||||||
app:layout_constraintEnd_toStartOf="@id/shareButton"
|
app:layout_constraintEnd_toStartOf="@+id/shareButton"
|
||||||
app:layout_constraintHorizontal_bias="0.5"
|
app:layout_constraintHorizontal_bias="0.5"
|
||||||
|
app:layout_constraintHorizontal_chainStyle="spread"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/linkView"/>
|
app:layout_constraintTop_toBottomOf="@+id/linkView"/>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/shareButton"
|
android:id="@+id/shareButton"
|
||||||
style="@style/BriarButtonFlat.Positive"
|
style="@style/BriarButtonFlat.Positive"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="@dimen/margin_large"
|
|
||||||
android:text="@string/share_button"
|
android:text="@string/share_button"
|
||||||
|
android:drawableLeft="@drawable/social_share_white"
|
||||||
|
android:drawablePadding="8dp"
|
||||||
|
android:drawableTint="@color/briar_button_text_positive"
|
||||||
app:layout_constraintBottom_toBottomOf="@id/copyButton"
|
app:layout_constraintBottom_toBottomOf="@id/copyButton"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toStartOf="@+id/showCodeButton"
|
||||||
app:layout_constraintHorizontal_bias="0.5"
|
app:layout_constraintHorizontal_bias="0.5"
|
||||||
app:layout_constraintStart_toEndOf="@id/copyButton"
|
app:layout_constraintStart_toEndOf="@+id/copyButton"
|
||||||
app:layout_constraintTop_toTopOf="@id/copyButton"/>
|
app:layout_constraintTop_toTopOf="@id/copyButton"/>
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/textView2"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginEnd="8dp"
|
|
||||||
android:layout_marginStart="8dp"
|
|
||||||
android:text="or"
|
|
||||||
android:textSize="18sp"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/copyButton"/>
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/showCodeButton"
|
android:id="@+id/showCodeButton"
|
||||||
style="@style/BriarButton"
|
style="@style/BriarButtonFlat.Positive"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="8dp"
|
|
||||||
android:layout_marginStart="8dp"
|
|
||||||
android:layout_marginTop="16dp"
|
|
||||||
android:drawableLeft="@drawable/ic_qr_code"
|
android:drawableLeft="@drawable/ic_qr_code"
|
||||||
android:drawablePadding="8dp"
|
android:drawablePadding="8dp"
|
||||||
android:text="Show QR Code"
|
android:drawableTint="@color/briar_button_text_positive"
|
||||||
|
android:text="QR Code"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/copyButton"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintHorizontal_bias="0.5"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/textView2"/>
|
app:layout_constraintStart_toEndOf="@+id/shareButton"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/copyButton"/>
|
||||||
|
|
||||||
</android.support.constraint.ConstraintLayout>
|
</android.support.constraint.ConstraintLayout>
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
android:layout_marginRight="8dp"
|
android:layout_marginRight="8dp"
|
||||||
android:layout_marginStart="8dp"
|
android:layout_marginStart="8dp"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
|
android:visibility="gone"
|
||||||
android:text="or"
|
android:text="or"
|
||||||
android:textSize="18sp"
|
android:textSize="18sp"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/enterLinkButton"
|
app:layout_constraintBottom_toTopOf="@+id/enterLinkButton"
|
||||||
@@ -41,6 +42,7 @@
|
|||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:drawableLeft="@drawable/ic_link"
|
android:drawableLeft="@drawable/ic_link"
|
||||||
android:drawablePadding="8dp"
|
android:drawablePadding="8dp"
|
||||||
|
android:visibility="gone"
|
||||||
android:text="Enter Link"
|
android:text="Enter Link"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
|||||||
@@ -20,14 +20,15 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintVertical_bias="0.0"
|
app:layout_constraintVertical_bias="0.0"
|
||||||
|
android:visibility="gone"
|
||||||
app:layout_constraintVertical_chainStyle="packed"
|
app:layout_constraintVertical_chainStyle="packed"
|
||||||
app:layout_constraintVertical_weight="1"
|
app:layout_constraintVertical_weight="1"
|
||||||
tools:visibility="visible"/>
|
tools:visibility="gone"/>
|
||||||
|
|
||||||
<org.briarproject.briar.android.view.QrCodeView
|
<org.briarproject.briar.android.view.QrCodeView
|
||||||
android:id="@+id/qrCodeView"
|
android:id="@+id/qrCodeView"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="0dp"
|
||||||
android:background="@android:color/white"
|
android:background="@android:color/white"
|
||||||
android:textIsSelectable="true"
|
android:textIsSelectable="true"
|
||||||
android:textSize="18sp"
|
android:textSize="18sp"
|
||||||
@@ -47,6 +48,7 @@
|
|||||||
android:layout_marginStart="8dp"
|
android:layout_marginStart="8dp"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:text="or"
|
android:text="or"
|
||||||
|
android:visibility="gone"
|
||||||
android:textSize="18sp"
|
android:textSize="18sp"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/showLinkButton"
|
app:layout_constraintBottom_toTopOf="@+id/showLinkButton"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
@@ -64,6 +66,7 @@
|
|||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:drawableLeft="@drawable/ic_link"
|
android:drawableLeft="@drawable/ic_link"
|
||||||
android:drawablePadding="8dp"
|
android:drawablePadding="8dp"
|
||||||
|
android:visibility="gone"
|
||||||
android:text="Show Link"
|
android:text="Show Link"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
|||||||
Reference in New Issue
Block a user