I'm doing a project of an app that will have a button to make a new record, the app has as main activity the listing of data in listview by clicking on it the previous activity appears but to update. SqlLite
I'm doing a project of an app that will have a button to make a new record, the app has as main activity the listing of data in listview by clicking on it the previous activity appears but to update. SqlLite
You can pass a parameter to your activity
when invoking it to know if the operation is a creation or update.
Intent intent = new Intent(MyActivity.class);
Bundle b = new Bundle();
b.putInt("crear", Boolean.TRUE); //crear o actualizar
intent.putExtras(b);
startActivity(intent);
finish();
From your activity
you pick up the parameter and you already know if you want to create or update.