Skip to content

Instantly share code, notes, and snippets.

@phpdave
Created October 3, 2016 20:26
Show Gist options
  • Save phpdave/248fd802a1d2f1b7e5f3f04c83112ff7 to your computer and use it in GitHub Desktop.
Save phpdave/248fd802a1d2f1b7e5f3f04c83112ff7 to your computer and use it in GitHub Desktop.
appView.getView().setId(100);
appView.getView().setLayoutParams(new FrameLayout.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT));
setContentView(appView.getView());
if (preferences.contains("BackgroundColor")) {
int backgroundColor = preferences.getInteger("BackgroundColor", Color.BLACK);
// Background of activity:
appView.getView().setBackgroundColor(backgroundColor);
}
appView.getView().requestFocusFromTouch();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment