Normally what you do is write a custom preference item, then you include it 
in the preferences.xml listing, and when it is called you can do all the 
things you want.  Simply calling the main intent may not be what you 
actually want as it may leave you with a very messy activity stack.
 

On Monday, July 16, 2012 8:28:26 PM UTC-4, billb wrote:

> I've seen examples in StackOverflow that used the  
> action:android.intent.action.VIEW, and the after reading the android docs 
> on intent, came to the obviously incorrect assumption that what I posted 
> would do what I wanted.
>  
> Do you have any further insights as to how I can get this button to return 
> the user to the mainactivity screen?  
>  
> BTW, I'm doing this as a way to get around devices that do not have the 
> return/go back physical button. Also, since this is a full-screen app there 
> would be no actionbar as well.
>  
> Thanks again,
> B.
>
>      <Preference android:layout="@layout/returntogame" 
> android:key="returnToGame"> 
>           <intent android:action="android.intent.action.MAIN"/> 
>       </Preference>
>
>>
>> Where did you get this from? I don't think that does what you think it 
>> does.
>>
>>
>> -------------------------------------------------------------------------------------------------
>> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago 
>> transit tracking app for Android-powered devices
>>
>>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to