Exemplo n.º 1
0
 @Override
 protected void onResume() {
   if (db.selectScore() == 0) {
     findViewById(R.id.button2).setVisibility(View.INVISIBLE);
   } else {
     findViewById(R.id.button2).setVisibility(View.VISIBLE);
   }
   super.onResume();
 }
Exemplo n.º 2
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {

    requestWindowFeature(Window.FEATURE_NO_TITLE);
    getWindow()
        .setFlags(
            WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
    super.onCreate(savedInstanceState);
    setContentView(R.layout.home);
    CustomApplication cApp = (CustomApplication) getApplicationContext();
    db = cApp.getDBAdapter();
    if (db.selectScore() == 0) {
      findViewById(R.id.button2).setVisibility(View.INVISIBLE);
    } else {
      findViewById(R.id.button2).setVisibility(View.VISIBLE);
    }
  }