mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-23 07:27:22 +01:00
fix invite-how alert not scrolling
By setting a custom view I wasn't using I broke scrolling of the AlertDialog's list view which I was using. Known bug apparently....
This commit is contained in:
parent
19fa3fce05
commit
163eaf9612
6 changed files with 23 additions and 22 deletions
|
@ -41,9 +41,9 @@ public class ConfirmThenAlert extends DlgDelegateAlert {
|
|||
|
||||
@Override
|
||||
public void populateBuilder( Context context, DlgState state,
|
||||
AlertDialog.Builder builder,
|
||||
NotAgainView naView )
|
||||
AlertDialog.Builder builder )
|
||||
{
|
||||
NotAgainView naView = addNAView( state, builder );
|
||||
OnClickListener lstnr = mkCallbackClickListener( naView );
|
||||
|
||||
builder.setTitle( state.m_titleId == 0 ? R.string.query_title : state.m_titleId )
|
||||
|
|
|
@ -64,27 +64,32 @@ abstract class DlgDelegateAlert extends XWDialogFragment {
|
|||
}
|
||||
|
||||
abstract void populateBuilder( Context context, DlgState state,
|
||||
AlertDialog.Builder builder,
|
||||
NotAgainView naView );
|
||||
AlertDialog.Builder builder );
|
||||
|
||||
Dialog create( AlertDialog.Builder builder ) { return builder.create(); }
|
||||
|
||||
protected NotAgainView addNAView( DlgState state, AlertDialog.Builder builder )
|
||||
{
|
||||
Context context = getActivity();
|
||||
NotAgainView naView =
|
||||
((NotAgainView)LocUtils.inflate( context, R.layout.not_again_view ))
|
||||
.setMessage( state.m_msg )
|
||||
.setShowNACheckbox( 0 != state.m_prefsNAKey );
|
||||
|
||||
builder.setView( naView );
|
||||
|
||||
return naView;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Dialog onCreateDialog( Bundle sis )
|
||||
{
|
||||
Context context = getActivity();
|
||||
DlgState state = getState( sis );
|
||||
|
||||
NotAgainView naView =
|
||||
((NotAgainView)LocUtils.inflate( context, R.layout.not_again_view ))
|
||||
.setMessage( state.m_msg )
|
||||
.setShowNACheckbox( 0 != state.m_prefsNAKey );
|
||||
AlertDialog.Builder builder = LocUtils.makeAlertBuilder( context );
|
||||
|
||||
AlertDialog.Builder builder = LocUtils.makeAlertBuilder( context )
|
||||
.setView( naView )
|
||||
;
|
||||
|
||||
populateBuilder( context, state, builder, naView );
|
||||
populateBuilder( context, state, builder );
|
||||
|
||||
return create( builder );
|
||||
}
|
||||
|
|
|
@ -47,8 +47,7 @@ public class EnableSMSAlert extends DlgDelegateAlert {
|
|||
|
||||
@Override
|
||||
public void populateBuilder( Context context, final DlgState state,
|
||||
AlertDialog.Builder builder,
|
||||
NotAgainView naView )
|
||||
AlertDialog.Builder builder )
|
||||
{
|
||||
View layout = LocUtils.inflate( context, R.layout.confirm_sms );
|
||||
mSpinner = (Spinner)layout.findViewById( R.id.confirm_sms_reasons );
|
||||
|
|
|
@ -35,7 +35,6 @@ import java.util.List;
|
|||
import org.eehouse.android.xw4.DBUtils.SentInvitesInfo;
|
||||
import org.eehouse.android.xw4.DlgDelegate.Action;
|
||||
import org.eehouse.android.xw4.DlgDelegate.ActionPair;
|
||||
import org.eehouse.android.xw4.DlgDelegate.ConfirmThenBuilder;
|
||||
import org.eehouse.android.xw4.DlgDelegate.DlgClickNotify.InviteMeans;
|
||||
import org.eehouse.android.xw4.DlgDelegate.NotAgainBuilder;
|
||||
import org.eehouse.android.xw4.Perms23.Perm;
|
||||
|
@ -54,8 +53,7 @@ public class InviteChoicesAlert extends DlgDelegateAlert {
|
|||
|
||||
@Override
|
||||
public void populateBuilder( final Context context, final DlgState state,
|
||||
AlertDialog.Builder builder,
|
||||
NotAgainView naView )
|
||||
AlertDialog.Builder builder )
|
||||
{
|
||||
final ArrayList<InviteMeans> means =
|
||||
new ArrayList<InviteMeans>();
|
||||
|
|
|
@ -47,9 +47,9 @@ public class NotAgainAlert extends DlgDelegateAlert {
|
|||
|
||||
@Override
|
||||
public void populateBuilder( Context context, DlgState state,
|
||||
AlertDialog.Builder builder,
|
||||
NotAgainView naView )
|
||||
AlertDialog.Builder builder )
|
||||
{
|
||||
NotAgainView naView = addNAView( state, builder );
|
||||
builder.setTitle( R.string.newbie_title )
|
||||
.setPositiveButton( android.R.string.ok,
|
||||
mkCallbackClickListener( naView ) );
|
||||
|
|
|
@ -47,8 +47,7 @@ public class OkOnlyAlert extends DlgDelegateAlert {
|
|||
|
||||
@Override
|
||||
public void populateBuilder( Context context, DlgState state,
|
||||
AlertDialog.Builder builder,
|
||||
NotAgainView naView )
|
||||
AlertDialog.Builder builder )
|
||||
{
|
||||
builder.setTitle( state.m_titleId == 0 ? R.string.info_title : state.m_titleId )
|
||||
.setPositiveButton( android.R.string.ok, null )
|
||||
|
|
Loading…
Add table
Reference in a new issue