title: Radio Button change layout activity Android Studio
body: <p><img src="https://i.stack.imgur.com/0lhA8s.png" alt="main menu"><br>
  <a href="https://i.stack.imgur.com/0lhA8s.png" rel="nofollow noreferrer">main menu</a>  </p>
  
  <p><img src="https://i.stack.imgur.com/7fILis.png" alt="difficulty image"><br>
  <a href="https://i.stack.imgur.com/7fILis.png" rel="nofollow noreferrer">difficulty image</a> </p>
  
  <p>Hello I'm developing a game. But I can't fix my game difficulty. How do I make the hardmode button run? I want when I checked the RadioButton any of them my play button in main menu will change the layout activity. help </p>
  
  <pre><code>btnOk.setOnClickListener(new View.OnClickListener() {
      @Override
      public void onClick(View v) {
  
          int selectedid = mMode.getCheckedRadioButtonId();
          if(selectedid == R.id.radiohard){
              Intent intentMain = new Intent(Settings.this, HardMode.class);
              startActivity(intentMain);
              Log.i("Content ", " Main layout ");
          }
              popupWindow.dismiss();
          }
      });
  </code></pre>