Merge pull request #3176 from deltachat/adb/issue-3164

add "copy invite link" button to QrShowFragment
This commit is contained in:
Asiel Díaz Benítez
2024-07-30 15:08:46 +02:00
committed by GitHub
3 changed files with 29 additions and 6 deletions
@@ -86,6 +86,8 @@ public class QrShowFragment extends Fragment implements DcEventCenter.DcEventDel
e.printStackTrace();
}
view.findViewById(R.id.share_link_button).setOnClickListener((v) -> shareInviteURL());
return view;
}
+26 -6
View File
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<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:layout_width="match_parent"
android:layout_height="match_parent">
@@ -8,14 +10,32 @@
android:id="@+id/background"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:ignore="ContentDescription"
android:scaleType="centerCrop" />
android:scaleType="centerCrop"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="ContentDescription" />
<com.caverock.androidsvg.SVGImageView
android:id="@+id/qrImage"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="0dp"
android:layout_gravity="center"
android:contentDescription="@string/qrscan_title" />
android:contentDescription="@string/qrscan_title"
app:layout_constraintBottom_toTopOf="@id/share_link_button"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</RelativeLayout>
<Button
android:id="@+id/share_link_button"
style="@style/ButtonPrimary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:paddingLeft="24dp"
android:paddingRight="24dp"
android:text="@string/share_invite_link"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
+1
View File
@@ -231,6 +231,7 @@
<string name="menu_delete_location">Delete this Location?</string>
<string name="menu_message_details">Message Info</string>
<string name="menu_copy_to_clipboard">Copy to Clipboard</string>
<string name="share_invite_link">Share Invite Link</string>
<string name="menu_copy_selection_to_clipboard">Copy Selection</string>
<string name="menu_copy_link_to_clipboard">Copy Link</string>
<string name="menu_copy_text_to_clipboard">Copy Text</string>