java – Use of "onclick" and "edittext" to save details in a database under android studio

I'm trying to save some data from a user input with the help of an already implemented button called AddUser. How to register two fields, username and password, in a SQ Lite database in Android Studio from edit text fields named USERNAME and PASSWORD? Please see the code below, any help would be appreciated.

public class Registrationing Expands AppCompatActivity {

@Override
Protected void onCreate (Bundle savedInstanceState) {

super.onCreate (savedInstanceState);
setContentView (R.layout.activity_registering);

final MyDBHelper db = new MyDBHelper (getBaseContext ()); // declare db as MyDBHelper

MyButton5 button = (Button) findViewById (R.id.AddUser);



// --- add a user ---
db.open ();
long id = db.insertUser ("John Smith", "Password");

db.close ();






MyButton4 button = (Button) findViewById (R.id.BtnRead);
MyButton4.setOnClickListener (new View.OnClickListener () {
public empty onClick (View v)
{
db.open ();

try{


Cursor c = db.getContact (1);
String username = c.getString (1);
Toast.makeText (getBaseContext (), "id:" + user name,
Toast.LENGTH_LONG) .show ();
} catch (Exception e) {
Toast.makeText (getBaseContext (), "no data was found",
Toast.LENGTH_LONG) .show ();

db.close ();
}
}
});

}

}