set background color of board root view from prefs on creation and

whenever pref color might have changed.
This commit is contained in:
Andy2 2011-06-03 23:35:06 -07:00
parent f29dff4ff5
commit 65efbe38c9

View file

@ -329,6 +329,7 @@ public class BoardActivity extends XWActivity
if ( m_path.charAt(0) == '/' ) {
m_path = m_path.substring( 1 );
}
setBackgroundColor();
} // onCreate
@Override
@ -370,6 +371,7 @@ public class BoardActivity extends XWActivity
if ( null != m_jniThread ) {
m_jniThread.handle( JNIThread.JNICmd.CMD_PREFS_CHANGE );
}
setBackgroundColor();
}
}
}
@ -1315,4 +1317,11 @@ public class BoardActivity extends XWActivity
m_toolbar.update( Toolbar.BUTTON_CHAT, m_gsi.gameIsConnected );
}
private void setBackgroundColor()
{
int back = CommonPrefs.get(this)
.otherColors[CommonPrefs.COLOR_BACKGRND];
m_view.getRootView().setBackgroundColor( back );
}
} // class BoardActivity