Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to block all other actions
    text
    copied!<p>In my app i have a ListView which dynamically increases by adding 10 items everytime on scrolling down. when i click on any item it takes me to a google-map, and to get back to the listView i have a button.</p> <pre><code> public void onClick(View arg0) { Intent intent = new Intent(MapMarkerActivity.this, FeedListViewActivity.class); startActivity(intent); } </code></pre> <p>but my FeedListViewActivity takes some 3-4 secs to load , so during this time if i click the back button on my device the screen flashes for some 0.3 sec and show the google-map(essentially its not going anywhere). now i click the back button on my device it gives me a blank screen and when i click the back button second time it takes me to the listView. the problem is here...now when i try to scroll the listview my app crashes saying:</p> <p>IndexOutOfBounf index=30 size=10;</p> <p>so i changed my onclick to:</p> <pre><code> public void onClick(View arg0) { finish(); } </code></pre> <p>now on clicking this button it gives me a blank screen and then i must click the back button of my device to get to the listview from the google-map.</p> <p>My question is why am i getting that blank screen... I mean why should i click twice back to get back to the listview and why am i getting the indexOutOfBound exception.</p> <p>The reason i named the question this way is "i want that back button on my device to be blocked when i click on the button(in my app) to go back to the listview which has a 3-4 sec delay"</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload