Skip to content

Instantly share code, notes, and snippets.

@rikwatson
Created August 22, 2012 06:32
Show Gist options
  • Save rikwatson/3422969 to your computer and use it in GitHub Desktop.
Save rikwatson/3422969 to your computer and use it in GitHub Desktop.
Android Analog Clock
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
// Full Screen
//
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
// Could use DigitalClock, but if you do then remove `setBackgroundColor`.
//
AnalogClock clock = new AnalogClock(this);
setContentView(clock);
clock.setBackgroundColor(Color.BLACK);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment