make turn color public so can be used from board too (though I'm not

doing that yet.)
This commit is contained in:
Eric House 2012-06-15 06:44:39 -07:00 committed by Eric House
parent 9d8e1ec261
commit bb5cd677ab
2 changed files with 4 additions and 3 deletions

View file

@ -46,7 +46,6 @@ public class GameListAdapter extends XWListAdapter {
private Context m_context; private Context m_context;
private LayoutInflater m_factory; private LayoutInflater m_factory;
private int m_fieldID; private int m_fieldID;
private static final int TURN_COLOR = 0x7F00FF00;
private class ViewInfo implements View.OnClickListener { private class ViewInfo implements View.OnClickListener {
private View m_view; private View m_view;
@ -79,7 +78,7 @@ public class GameListAdapter extends XWListAdapter {
m_name.setBackgroundColor( android.R.color.transparent ); m_name.setBackgroundColor( android.R.color.transparent );
if ( !m_expanded ) { if ( !m_expanded ) {
if ( m_haveTurnLocal ) { if ( m_haveTurnLocal ) {
m_name.setBackgroundColor( TURN_COLOR ); m_name.setBackgroundColor( Utils.TURN_COLOR );
} else if ( m_haveTurn ) { } else if ( m_haveTurn ) {
m_name.setBackgroundResource( R.drawable.green_border ); m_name.setBackgroundResource( R.drawable.green_border );
} }
@ -185,7 +184,7 @@ public class GameListAdapter extends XWListAdapter {
haveTurn = true; haveTurn = true;
if ( isLocal[0] ) { if ( isLocal[0] ) {
haveTurnLocal = true; haveTurnLocal = true;
tmp.setBackgroundColor( TURN_COLOR ); tmp.setBackgroundColor( Utils.TURN_COLOR );
} else { } else {
tmp.setBackgroundResource( R.drawable.green_border ); tmp.setBackgroundResource( R.drawable.green_border );
} }

View file

@ -48,6 +48,8 @@ import junit.framework.Assert;
import org.eehouse.android.xw4.jni.*; import org.eehouse.android.xw4.jni.*;
public class Utils { public class Utils {
public static final int TURN_COLOR = 0x7F00FF00;
private static final String DB_PATH = "XW_GAMES"; private static final String DB_PATH = "XW_GAMES";
private static final String HIDDEN_PREFS = "xwprefs_hidden"; private static final String HIDDEN_PREFS = "xwprefs_hidden";
private static final String SHOWN_VERSION_KEY = "SHOWN_VERSION_KEY"; private static final String SHOWN_VERSION_KEY = "SHOWN_VERSION_KEY";