OnResume not showing desired result on 1sr attempt
up vote
0
down vote
favorite
I am new to android coding and need help with my project :
I have a function which I call from the OnResume of the mainActivity . The function reloads the data from the database and shows it on the list view .
Now when I go to second Activity and enter new data , the data is saved when onPause of secondActivity is called . On returning to mainActivity I don't see the changes made to list view but when I click on the same item of list view and go to second Activity again on returning for the 2nd time the changes start showing and the code works properly . What could be the possible reason for function not working in the 1st attempt ?
Note : I also call the function from onCreate of main Activity
Thanks in advance
java android android-studio
add a comment |
up vote
0
down vote
favorite
I am new to android coding and need help with my project :
I have a function which I call from the OnResume of the mainActivity . The function reloads the data from the database and shows it on the list view .
Now when I go to second Activity and enter new data , the data is saved when onPause of secondActivity is called . On returning to mainActivity I don't see the changes made to list view but when I click on the same item of list view and go to second Activity again on returning for the 2nd time the changes start showing and the code works properly . What could be the possible reason for function not working in the 1st attempt ?
Note : I also call the function from onCreate of main Activity
Thanks in advance
java android android-studio
OnResume of first activity gets called when you come back from second activity,However there could be timing issue.Can you paste your code?
– Ramesh Yankati
21 hours ago
are you calling a.notifyDataSetChanged()
in onResume?
– Keheira
20 hours ago
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am new to android coding and need help with my project :
I have a function which I call from the OnResume of the mainActivity . The function reloads the data from the database and shows it on the list view .
Now when I go to second Activity and enter new data , the data is saved when onPause of secondActivity is called . On returning to mainActivity I don't see the changes made to list view but when I click on the same item of list view and go to second Activity again on returning for the 2nd time the changes start showing and the code works properly . What could be the possible reason for function not working in the 1st attempt ?
Note : I also call the function from onCreate of main Activity
Thanks in advance
java android android-studio
I am new to android coding and need help with my project :
I have a function which I call from the OnResume of the mainActivity . The function reloads the data from the database and shows it on the list view .
Now when I go to second Activity and enter new data , the data is saved when onPause of secondActivity is called . On returning to mainActivity I don't see the changes made to list view but when I click on the same item of list view and go to second Activity again on returning for the 2nd time the changes start showing and the code works properly . What could be the possible reason for function not working in the 1st attempt ?
Note : I also call the function from onCreate of main Activity
Thanks in advance
java android android-studio
java android android-studio
asked 21 hours ago
Minhal ali khan
62
62
OnResume of first activity gets called when you come back from second activity,However there could be timing issue.Can you paste your code?
– Ramesh Yankati
21 hours ago
are you calling a.notifyDataSetChanged()
in onResume?
– Keheira
20 hours ago
add a comment |
OnResume of first activity gets called when you come back from second activity,However there could be timing issue.Can you paste your code?
– Ramesh Yankati
21 hours ago
are you calling a.notifyDataSetChanged()
in onResume?
– Keheira
20 hours ago
OnResume of first activity gets called when you come back from second activity,However there could be timing issue.Can you paste your code?
– Ramesh Yankati
21 hours ago
OnResume of first activity gets called when you come back from second activity,However there could be timing issue.Can you paste your code?
– Ramesh Yankati
21 hours ago
are you calling a
.notifyDataSetChanged()
in onResume?– Keheira
20 hours ago
are you calling a
.notifyDataSetChanged()
in onResume?– Keheira
20 hours ago
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53349341%2fonresume-not-showing-desired-result-on-1sr-attempt%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
OnResume of first activity gets called when you come back from second activity,However there could be timing issue.Can you paste your code?
– Ramesh Yankati
21 hours ago
are you calling a
.notifyDataSetChanged()
in onResume?– Keheira
20 hours ago