mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-07-13 17:51:57 +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:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
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
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|
|
||||||
|
|
@ -12,51 +12,36 @@
|
||||||
style="@style/SectionTitle"
|
style="@style/SectionTitle"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<android.support.v7.widget.CardView
|
<FrameLayout
|
||||||
android:layout_width="match_parent"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_height="wrap_content"
|
android:orientation="vertical"
|
||||||
style="@style/CardView.Default"
|
android:layout_width="fill_parent"
|
||||||
>
|
android:layout_height="200dp"
|
||||||
|
android:id="@+id/qrCodeWrapper">
|
||||||
|
|
||||||
<LinearLayout
|
<ImageView
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
style="@style/CardContent">
|
android:id="@+id/QRImageView"
|
||||||
|
android:layout_gravity="center_horizontal" />
|
||||||
|
|
||||||
<FrameLayout
|
<com.habitrpg.android.habitica.ui.AvatarView
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
android:id="@+id/avatarView"
|
||||||
android:orientation="vertical"
|
android:layout_width="103dp"
|
||||||
android:layout_width="fill_parent"
|
android:layout_height="90dp"
|
||||||
android:layout_height="200dp"
|
android:layout_gravity="center"
|
||||||
android:id="@+id/qrCodeWrapper">
|
/>
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
<ImageView
|
<Button
|
||||||
android:layout_width="match_parent"
|
android:id="@+id/QRDownloadButton"
|
||||||
android:layout_height="match_parent"
|
android:layout_width="wrap_content"
|
||||||
android:id="@+id/QRImageView"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_horizontal" />
|
android:text="Download"
|
||||||
|
style="@style/Widget.AppCompat.Button.Colored"
|
||||||
<com.habitrpg.android.habitica.ui.AvatarView
|
android:layout_margin="20dp"
|
||||||
android:id="@+id/avatarView"
|
android:layout_gravity="center_horizontal|bottom"
|
||||||
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>
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/dialogButtonOK"
|
android:id="@+id/dialogButtonOK"
|
||||||
android:layout_width="40dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Ok"
|
android:text="Ok"
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="5dp"
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,7 @@ public class QrCodeManager {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Bitmap myBitmap = QRCode.from(this.content).bitmap();
|
Bitmap myBitmap = QRCode.from(this.content).withSize(1000, 1000).bitmap();
|
||||||
qrCodeImageView.setImageBitmap(myBitmap);
|
qrCodeImageView.setImageBitmap(myBitmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue