Esempio 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();
 }
Esempio 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);
    }
  }
Esempio n. 3
0
  public void launchNewGame(View v) {

    db.deleteSavedGame();
    Intent myIntent = new Intent(HomeActivity.this, AdralchimieActivity.class);
    HomeActivity.this.startActivity(myIntent);
  }