You can do the following: Catch the firebase reference:
mDatabase = FirebaseDatabase.getInstance().getReference();
Then create the fields in which the data will be inserted:
nomeEdit = (EditText) findViewById(R.id.field_nome);
sobrenomeEdit = (EditText) findViewById(R.id.field_sobrenome);
idadeEdit = (EditText) findViewById(R.id.field_idade);
Take what was typed in these fields:
final String nome = nomeEdit.getText().toString();
final String sobrenome = sobrenomeEdit.getText().toString();
final String idade = idadeEdit.getText().toString();
Then you can use a Map to insert the data you entered in EditTexts.
private void SalvarDados(String userId, String nome, String sobrenome, String idade) {
String key = mDatabase.child("usuario").push().getKey();
Post post = new Post(userId, nome, sobrenome, idade);
Map<String, Object> postValues = post.toMap();
Map<String, Object> childUpdates = new HashMap<>();
childUpdates.put("/usuario-dados/" + userId + "/" + key, postValues);
mDatabase.updateChildren(childUpdates);
}
To display them, just create an adapter in the main activity of your application.