mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-04 23:02:02 +01:00
load new dualpane delegate when enabled. It does nothing so far, not
even allowing you to disable it again.
This commit is contained in:
parent
377ac269c9
commit
9865c0c68c
6 changed files with 60 additions and 11 deletions
|
@ -164,7 +164,7 @@ public final class R {
|
|||
public static final int exchange_buttons=0x7f0b0004;
|
||||
public static final int exchange_cancel=0x7f0b0006;
|
||||
public static final int exchange_commit=0x7f0b0005;
|
||||
public static final int expander=0x7f0b0029;
|
||||
public static final int expander=0x7f0b002a;
|
||||
public static final int filters=0x7f0b0060;
|
||||
public static final int flip_button=0x7f0b0086;
|
||||
public static final int game_locked_check=0x7f0b002c;
|
||||
|
@ -211,7 +211,7 @@ public final class R {
|
|||
public static final int item_score=0x7f0b0072;
|
||||
public static final int join_public_room_check=0x7f0b0038;
|
||||
public static final int juggle_players=0x7f0b0035;
|
||||
public static final int label=0x7f0b0028;
|
||||
public static final int label=0x7f0b0029;
|
||||
public static final int lang_separator=0x7f0b002f;
|
||||
public static final int lang_spinner=0x7f0b0030;
|
||||
public static final int loc_item_check=0x7f0b00cb;
|
||||
|
@ -222,7 +222,7 @@ public final class R {
|
|||
public static final int loc_search_field=0x7f0b0061;
|
||||
public static final int local_label=0x7f0b005d;
|
||||
public static final int local_player_set=0x7f0b006b;
|
||||
public static final int main_container=0x7f0b002b;
|
||||
public static final int main_container=0x7f0b0028;
|
||||
public static final int manual_add_button=0x7f0b0079;
|
||||
public static final int modtime=0x7f0b0050;
|
||||
public static final int msg=0x7f0b0068;
|
||||
|
@ -244,7 +244,7 @@ public final class R {
|
|||
public static final int play_button=0x7f0b002d;
|
||||
public static final int player_list=0x7f0b0033;
|
||||
public static final int player_name_edit=0x7f0b006c;
|
||||
public static final int players=0x7f0b002a;
|
||||
public static final int players=0x7f0b002b;
|
||||
public static final int players_label=0x7f0b0032;
|
||||
public static final int prevhint_button=0x7f0b007f;
|
||||
public static final int private_rooms_set=0x7f0b0039;
|
||||
|
@ -311,9 +311,9 @@ public final class R {
|
|||
public static final int dict_browse=0x7f03000b;
|
||||
public static final int dict_browser=0x7f03000c;
|
||||
public static final int divider_view=0x7f03000d;
|
||||
public static final int expander_header=0x7f03000e;
|
||||
public static final int force_remote=0x7f03000f;
|
||||
public static final int fragact=0x7f030010;
|
||||
public static final int dualcontainer=0x7f03000e;
|
||||
public static final int expander_header=0x7f03000f;
|
||||
public static final int force_remote=0x7f030010;
|
||||
public static final int game_config=0x7f030011;
|
||||
public static final int game_list=0x7f030012;
|
||||
public static final int game_list_group=0x7f030013;
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
/* -*- compile-command: "find-and-ant.sh debug install"; -*- */
|
||||
/*
|
||||
* Copyright 2009 - 2016 by Eric House (xwords@eehouse.org). All
|
||||
* rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
package org.eehouse.android.xw4;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
public class DualpaneDelegate extends DelegateBase {
|
||||
|
||||
public DualpaneDelegate( Delegator delegator, Bundle sis )
|
||||
{
|
||||
super( delegator, sis, R.layout.dualcontainer );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void init( Bundle savedInstanceState )
|
||||
{
|
||||
}
|
||||
}
|
|
@ -58,7 +58,7 @@ public class FragActivity extends FragmentActivity
|
|||
{
|
||||
s_this = this;
|
||||
super.onCreate( savedInstanceState );
|
||||
setContentView( R.layout.fragact );
|
||||
setContentView( R.layout.dualcontainer );
|
||||
|
||||
m_root = (LinearLayout)findViewById( R.id.main_container );
|
||||
getSupportFragmentManager().addOnBackStackChangedListener( this );
|
||||
|
|
|
@ -30,12 +30,16 @@ import org.eehouse.android.xw4.jni.CurGameInfo;
|
|||
import junit.framework.Assert;
|
||||
|
||||
public class MainActivity extends XWActivity {
|
||||
private GamesListDelegate m_dlgt;
|
||||
private DelegateBase m_dlgt;
|
||||
|
||||
@Override
|
||||
protected void onCreate( Bundle savedInstanceState )
|
||||
{
|
||||
m_dlgt = new GamesListDelegate( this, savedInstanceState );
|
||||
if ( XWPrefs.dualpaneEnabled( this ) ) {
|
||||
m_dlgt = new DualpaneDelegate( this, savedInstanceState );
|
||||
} else {
|
||||
m_dlgt = new GamesListDelegate( this, savedInstanceState );
|
||||
}
|
||||
super.onCreate( savedInstanceState, m_dlgt );
|
||||
|
||||
// Trying to debug situation where two of this activity are running at
|
||||
|
@ -52,7 +56,11 @@ public class MainActivity extends XWActivity {
|
|||
protected void onNewIntent( Intent intent )
|
||||
{
|
||||
super.onNewIntent( intent );
|
||||
m_dlgt.onNewIntent( intent );
|
||||
|
||||
// HACK!!!!! FIXME
|
||||
if ( m_dlgt instanceof GamesListDelegate ) {
|
||||
((GamesListDelegate)m_dlgt).onNewIntent( intent );
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -449,6 +449,11 @@ public class XWPrefs {
|
|||
getPrefsBoolean( context, R.string.key_force_tablet, false );
|
||||
}
|
||||
|
||||
public static boolean dualpaneEnabled( Context context )
|
||||
{
|
||||
return getPrefsBoolean( context, R.string.key_enable_dualpane, false );
|
||||
}
|
||||
|
||||
public static CommsConnTypeSet getAddrTypes( Context context )
|
||||
{
|
||||
CommsConnTypeSet result;
|
||||
|
|
Loading…
Reference in a new issue