title: Get selected radio button id placed in navigation view
body: <p>I have taken radio group in the navigation view of drawer layout like this</p>
  
  <pre><code> &lt;android.support.design.widget.NavigationView
       app:headerLayout="@layout/header"
       app:menu="@menu/drawer"&gt;
  
   &lt;RadioGroup&gt;
        &lt;RadioButton/&gt;
        &lt;RadioButton/&gt;
   &lt;/RadioGroup&gt;
  
       &lt;/android.support.design.widget.NavigationView&gt;
  </code></pre>
  
  <p>I want to get the selected radio button text or id but I am not getting any logs or Toast and no errors also..</p>
  
  <p>Code for getting selected radio button:</p>
  
  <pre><code>rg.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
           @Override
           public void onCheckedChanged(RadioGroup group, int checkedId) {
              int pos=rg.indexOfChild(findViewById(checkedId));
               Toast.makeText(MainActivity.this, "ID = "+String.valueOf(pos),
                       Toast.LENGTH_SHORT).show();
               Log.e("",""+pos);
           } 
  </code></pre>
  
  <p>I know I can achieve this by using custom list view.. But how to get this working..</p>