mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-19 04:09:03 +00:00
Restyled popup for QR
This commit is contained in:
parent
9ed527378c
commit
4904cbc7b9
4 changed files with 42 additions and 43 deletions
|
|
@ -41,7 +41,21 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include layout="@layout/qr_code" />
|
||||
<android.support.v7.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/CardView.Default"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
style="@style/CardContent">
|
||||
|
||||
<include layout="@layout/qr_code" />
|
||||
</LinearLayout>
|
||||
</android.support.v7.widget.CardView>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
|
|
|
|||
|
|
@ -12,51 +12,36 @@
|
|||
style="@style/SectionTitle"
|
||||
/>
|
||||
|
||||
<android.support.v7.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/CardView.Default"
|
||||
>
|
||||
<FrameLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="200dp"
|
||||
android:id="@+id/qrCodeWrapper">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
style="@style/CardContent">
|
||||
android:id="@+id/QRImageView"
|
||||
android:layout_gravity="center_horizontal" />
|
||||
|
||||
<FrameLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="200dp"
|
||||
android:id="@+id/qrCodeWrapper">
|
||||
<com.habitrpg.android.habitica.ui.AvatarView
|
||||
android:id="@+id/avatarView"
|
||||
android:layout_width="103dp"
|
||||
android:layout_height="90dp"
|
||||
android:layout_gravity="center"
|
||||
/>
|
||||
</FrameLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/QRImageView"
|
||||
android:layout_gravity="center_horizontal" />
|
||||
|
||||
<com.habitrpg.android.habitica.ui.AvatarView
|
||||
android:id="@+id/avatarView"
|
||||
android:layout_width="103dp"
|
||||
android:layout_height="90dp"
|
||||
android:layout_gravity="center"
|
||||
/>
|
||||
</FrameLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/QRDownloadButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Download"
|
||||
style="@style/Widget.AppCompat.Button.Colored"
|
||||
android:layout_margin="20dp"
|
||||
android:layout_gravity="center_horizontal|bottom"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
</android.support.v7.widget.CardView>
|
||||
<Button
|
||||
android:id="@+id/QRDownloadButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Download"
|
||||
style="@style/Widget.AppCompat.Button.Colored"
|
||||
android:layout_margin="20dp"
|
||||
android:layout_gravity="center_horizontal|bottom"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
<Button
|
||||
android:id="@+id/dialogButtonOK"
|
||||
android:layout_width="40dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Ok"
|
||||
android:layout_marginTop="5dp"
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ public class QrCodeManager {
|
|||
return;
|
||||
}
|
||||
|
||||
Bitmap myBitmap = QRCode.from(this.content).bitmap();
|
||||
Bitmap myBitmap = QRCode.from(this.content).withSize(1000, 1000).bitmap();
|
||||
qrCodeImageView.setImageBitmap(myBitmap);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue