This is my first post, so please be nice 🙂
I have a question and no one gave the answer in the post I’ve seen.
My app has a list and a button to open an activity, this activity creates a new item to show in the list of the previous activity when pressing the button Create.
How can I do this?
This is the code I made for the first button:
intent = new Intent(this.getBaseContext(), NewTestActivity.class);
this.finish();
startActivity(intent);
and this is the code to go back an refresh:
Intent intent = new Intent(getBaseContext(), TestListActivity.class);
startActivity(intent);
But the code to goback is useful, because the activity don’t refresh.
I have to call the new activity in a diferent way? Or go back to previus activity in a diferent way? Or go back normally and refresh the activity when I’m back in the previus activity?
Well…this is all.
Sorry for my bad english and, if this question has been answered in another thread, give me the link to read, because I can’t find it 🙂
PS: I started with android in December.
Thanks for your help.
this.finish();row from your code)ListView.notifyDataSetChanged()method call.