mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-30 10:26:58 +01:00
trying to hide the buttons when they take too much space. Leaving
commented out for now
This commit is contained in:
parent
301ce8bc3c
commit
8d021aa11e
1 changed files with 30 additions and 6 deletions
|
@ -33,6 +33,7 @@ import android.view.Menu;
|
|||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.AbsListView;
|
||||
import android.widget.AdapterView.OnItemLongClickListener;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.Button;
|
||||
|
@ -858,23 +859,46 @@ public class GamesListDelegate extends ListDelegateBase
|
|||
}
|
||||
|
||||
mkListAdapter();
|
||||
getListView().setOnItemLongClickListener( this );
|
||||
ListView listView = getListView();
|
||||
listView.setOnItemLongClickListener( this );
|
||||
|
||||
Button button = (Button)findViewById( R.id.button_newgame_solo );
|
||||
button.setOnClickListener( new View.OnClickListener() {
|
||||
final Button soloButton =
|
||||
(Button)findViewById( R.id.button_newgame_solo );
|
||||
soloButton.setOnClickListener( new View.OnClickListener() {
|
||||
public void onClick( View view ) {
|
||||
m_nextIsSolo = true;
|
||||
showDialog( DlgID.GAMES_LIST_NEWGAME );
|
||||
}
|
||||
} );
|
||||
button = (Button)findViewById( R.id.button_newgame_multi );
|
||||
button.setOnClickListener( new View.OnClickListener() {
|
||||
final Button netButton = (Button)findViewById( R.id.button_newgame_multi );
|
||||
netButton.setOnClickListener( new View.OnClickListener() {
|
||||
public void onClick( View view ) {
|
||||
m_nextIsSolo = false;
|
||||
showDialog( DlgID.GAMES_LIST_NEWGAME );
|
||||
}
|
||||
} );
|
||||
|
||||
// This doesn't work: test isn't sensitive enough, and doesn't notice
|
||||
// scrolling's possible until the user actually does it, then winds up
|
||||
// flashing the screen.
|
||||
//
|
||||
// listView.setOnScrollListener( new AbsListView.OnScrollListener() {
|
||||
// @Override
|
||||
// public void onScroll( AbsListView lw, int firstVisItem,
|
||||
// int nVisItems, int nTotalItems ) {
|
||||
// DbgUtils.logf( "onScroll(nVis=%d, nTotal=%d)", nVisItems,
|
||||
// nTotalItems );
|
||||
// if ( 0 < nVisItems && nVisItems < nTotalItems ) {
|
||||
// DbgUtils.logf( "scroll list too big; hiding buttons" );
|
||||
// soloButton.setVisibility( View.GONE );
|
||||
// netButton.setVisibility( View.GONE );
|
||||
// getListView().setOnScrollListener( null );
|
||||
// }
|
||||
// }
|
||||
// @Override
|
||||
// public void onScrollStateChanged (AbsListView view, int scrollState) {}
|
||||
// });
|
||||
|
||||
NetUtils.informOfDeaths( m_activity );
|
||||
|
||||
tryStartsFromIntent( getIntent() );
|
||||
|
@ -1979,7 +2003,7 @@ public class GamesListDelegate extends ListDelegateBase
|
|||
|
||||
private void mkListAdapter()
|
||||
{
|
||||
DbgUtils.logf( "GamesListDelegate.mkListAdapter()" );
|
||||
// DbgUtils.logf( "GamesListDelegate.mkListAdapter()" );
|
||||
m_adapter = new GameListAdapter();
|
||||
setListAdapterKeepScroll( m_adapter );
|
||||
|
||||
|
|
Loading…
Reference in a new issue