Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid App re-opens upon "back-out"
    primarykey
    data
    text
    <p>On my application when I back out of the menu screen to leave the application it re-opens and displays one of the Views that are further into the app than the main menu. On my debugger it says simply</p> <pre><code> 06-08 11:00:53.952: INFO/ActivityManager(120): Displayed activity com.app/mainmenu: 1653 ms (total 1653 ms) //I press back to leave the app back to the main screen 06-08 11:00:58.112: INFO/ActivityManager(120): Starting activity: Intent { cmp=com.app/gridview (has extras) } </code></pre> <p>No explaination as to why it is opening that screen.</p> <p>I have placed this Method (possibly the wrong technical term) in both of the activities that are involved.</p> <pre><code> @Override public void onBackPressed() { // TODO Auto-generated method stub super.onBackPressed(); finish(); } </code></pre> <p>Any ideas as to why it might be doing this? I have considered inserting some sort of "kill-app" code but I have read that it's ill-advised.</p> <p>update; thanks for the suggestion inazaruk, I removed the onBackPressed() override on both screens and it does the same thing.</p> <p>If I am using the wrong terms when searching for a way to solve this, someone please advise. I do like solving things on my own. When I use the keywords (the tags that are linked to this article) I get alot of message boards for users and not a lot of development boards. (I throw in the word Java and developer sometimes, but they yield results far from what I am looking for) </p> <p>update 2: looks like I should take a look at something referenced here <a href="https://stackoverflow.com/questions/4099439/how-to-close-an-application-programaticaly">How can I programmatically close an application?</a> my gridview may be doing some things wrong.</p> <p>Another update:</p> <pre><code>&lt;activity android:name=".Menu" android:label="@string/app_name" android:configChanges="orientation" android:screenOrientation="portrait"&gt; &lt;intent-filter&gt; &lt;action android:name="android.intent.action.MAIN" /&gt; &lt;category android:name="android.intent.category.LAUNCHER" /&gt; &lt;/intent-filter&gt; &lt;/activity&gt; &lt;activity android:name=".mImageGridview" android:configChanges="orientation" android:screenOrientation="portrait"&gt; &lt;intent-filter&gt; &lt;action android:name="com.hagsvision.mImageGridview" /&gt; &lt;category android:name="android.intent.category.DEFAULT" /&gt; &lt;/intent-filter&gt; &lt;/activity&gt; </code></pre> <p>possible that "default"?</p> <p>I should try that on a lady "hey baby. Show me your manifest"</p> <p>Solved it, on the main menu I was incorrectly implementing an onTouchListener. When I press the back button it apparently qualifies as an "onTouch" and it went to a default selection. I changed it to implement a onClick listener and it functions properly now.</p> <p>I also removed the category.DEFAULT from the manifest though I don't think that it was the problem.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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