put GameOver view layout into a ScrollView

When device in landscape the archive box is otherwise unreachable on a
four-player game
This commit is contained in:
Eric House 2019-02-12 07:47:57 -08:00
parent dc1431fd08
commit 682501814b
2 changed files with 31 additions and 25 deletions

View file

@ -26,10 +26,10 @@ import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.LinearLayout;
import android.widget.TextView;
import org.eehouse.android.xw4.DlgDelegate.Action;
@ -49,7 +49,7 @@ public class GameOverAlert extends XWDialogFragment
private GameSummary mSummary;
private int mTitleID;
private String mMsg;
private LinearLayout m_view;
private ViewGroup m_view;
private boolean mInArchive;
private CheckBox mArchiveBox;
// private boolean mArchiveChecked;
@ -95,7 +95,7 @@ public class GameOverAlert extends XWDialogFragment
mInArchive = sis.getBoolean( IN_ARCH );
Activity activity = getActivity();
m_view = (LinearLayout)LocUtils.inflate( activity, R.layout.game_over );
m_view = (ViewGroup)LocUtils.inflate( activity, R.layout.game_over );
initView();
AlertDialog.Builder ab = LocUtils.makeAlertBuilder( activity )

View file

@ -1,24 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="10dp"
>
<TextView android:id="@+id/msg"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
/>
<!-- spacer -->
<View android:layout_height="15dp"
android:layout_width="match_parent"
/>
<CheckBox android:id="@+id/archive_check"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/button_archive"
/>
</LinearLayout>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="10dp"
>
<TextView android:id="@+id/msg"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
/>
<!-- spacer -->
<View android:layout_height="15dp"
android:layout_width="match_parent"
/>
<CheckBox android:id="@+id/archive_check"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/button_archive"
/>
</LinearLayout>
</ScrollView>