Note that there are some explanatory texts on larger screens.

plurals
  1. POopen radio buttons in different class
    primarykey
    data
    text
    <p>I am building a login system in android and i need to accomplish the following:</p> <ul> <li>save userdata on the local storage</li> <li>when a user is created and i press on the button it needs to dynamically create a radiobutton with the user name and short name in it.</li> </ul> <p>I have already managed to accomplish these things, but the only problem i have now is that i want to to have 2 classes, one where you register your account and the other where the radiobuttons with the user data is displayed. So my question: how can i program the calss in such a way that when i press on the register button that it creates the radiobuttons in a different class.</p> <p>beneath is the code of the classes:</p> <pre><code>enter code here @Override public void onClick(View v) { // TODO Auto-generated method stub switch (v.getId()) { case R.id.Save: Intent I = new Intent(); I.putExtra( I.setClass(this, ShowUsers.class); startActivity(I); break; } } </code></pre> <p>}</p> <pre><code>@Override public void onClick(View v) { // TODO Auto-generated method stub // Start other Activity switch (v.getId()) { case R.id.create: Intent intent = new Intent(); intent.setClass(Main.this, Register.class); startActivity(intent); break; } Bundle extras = getIntent().getExtras(); String userName; if (extras != null) { userName = extras.getString("editTextName,editTextPassword,editTextshortname"); // and get whatever type user account id is } } </code></pre> <p>}</p> <p>when i click the save button it needs to create the radio button in the main class, now the question is how can i accomplish this?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload