Fixed ReceiveTransactionFragment to use full screen width

master
Severiano Jaramillo 2017-12-23 21:39:41 -06:00
parent 49f032ff99
commit eac5a0e8c4
4 changed files with 19 additions and 4 deletions

View File

@ -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();

View File

@ -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

View File

@ -2,10 +2,8 @@
<android.support.constraint.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="wrap_content"
android:minWidth="350dp">
android:layout_height="wrap_content" >
<View
android:id="@+id/topView"
@ -121,6 +119,7 @@
android:layout_marginStart="24dp"
android:layout_marginTop="8dp"
android:adjustViewBounds="true"
android:contentDescription="@string/qr_code"
android:src="@color/gray"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"

View File

@ -462,4 +462,5 @@
<string name="my_accounts">My Accounts</string>
<string name="dont_have_multiple_accounts">You don\'t have multiple accounts at the moment</string>
<string name="settings">SETTINGS</string>
<string name="qr_code">QR code</string>
</resources>