From eac5a0e8c46472c0900b090c720d20ecfbfd4371 Mon Sep 17 00:00:00 2001 From: Severiano Jaramillo Date: Sat, 23 Dec 2017 21:39:41 -0600 Subject: [PATCH] Fixed ReceiveTransactionFragment to use full screen width --- .../fragments/ReceiveTransactionFragment.java | 12 ++++++++++++ .../fragments/SendTransactionFragment.java | 5 ++++- app/src/main/res/layout/receive_transaction.xml | 5 ++--- app/src/main/res/values/strings.xml | 1 + 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/cy/agorise/crystalwallet/fragments/ReceiveTransactionFragment.java b/app/src/main/java/cy/agorise/crystalwallet/fragments/ReceiveTransactionFragment.java index d2e00f5..3e26231 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/fragments/ReceiveTransactionFragment.java +++ b/app/src/main/java/cy/agorise/crystalwallet/fragments/ReceiveTransactionFragment.java @@ -17,6 +17,8 @@ import android.text.Editable; import android.util.Log; import android.view.LayoutInflater; import android.view.View; +import android.view.ViewGroup; +import android.view.Window; import android.widget.Button; import android.widget.EditText; import android.widget.ImageView; @@ -175,6 +177,16 @@ public class ReceiveTransactionFragment extends DialogFragment implements UIVali return dialog; } + @Override + public void onResume() { + super.onResume(); + + // Force dialog fragment to use the full width of the screen + Window dialogWindow = getDialog().getWindow(); + assert dialogWindow != null; + dialogWindow.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); + } + @Override public void onDestroy() { super.onDestroy(); diff --git a/app/src/main/java/cy/agorise/crystalwallet/fragments/SendTransactionFragment.java b/app/src/main/java/cy/agorise/crystalwallet/fragments/SendTransactionFragment.java index ac6d16d..c27a242 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/fragments/SendTransactionFragment.java +++ b/app/src/main/java/cy/agorise/crystalwallet/fragments/SendTransactionFragment.java @@ -17,6 +17,7 @@ import android.text.Editable; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import android.view.Window; import android.view.animation.LinearInterpolator; import android.widget.Button; import android.widget.EditText; @@ -148,7 +149,9 @@ public class SendTransactionFragment extends DialogFragment implements UIValidat super.onResume(); // Force dialog fragment to use the full width of the screen - getDialog().getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); + Window dialogWindow = getDialog().getWindow(); + assert dialogWindow != null; + dialogWindow.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); } @Override diff --git a/app/src/main/res/layout/receive_transaction.xml b/app/src/main/res/layout/receive_transaction.xml index 37dda20..ddcc678 100644 --- a/app/src/main/res/layout/receive_transaction.xml +++ b/app/src/main/res/layout/receive_transaction.xml @@ -2,10 +2,8 @@ + android:layout_height="wrap_content" > My Accounts You don\'t have multiple accounts at the moment SETTINGS + QR code