Skip to content

Instantly share code, notes, and snippets.

@duraiganesh0
Last active January 20, 2017 11:53
Show Gist options
  • Save duraiganesh0/7735b73e7c694fe0b95374257626b27e to your computer and use it in GitHub Desktop.
Save duraiganesh0/7735b73e7c694fe0b95374257626b27e to your computer and use it in GitHub Desktop.
@Override
protected void onCreate(Bundle savedInstanceState) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
Window w = getWindow();
w.addFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
w.addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
}
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
handler = new Handler();
handler.postDelayed(runnable = new Runnable() {
@Override
public void run() {
runTimer();
handler.postDelayed(this, INTERVAL);
}
}, INTERVAL);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment