我写了个登录程序,但是我一旦登陆后进入功能界面,这时按手机主页键把功能界面放到后台。如果我再点击程序图标,进入的确实登陆界面,而不是我后台那个功能界面。不知道该怎么设置啊?

解决方案 »

  1.   

     配置文件: <activity android:name="org.sipdroid.sipua.ui.InputPIN" android:label="@string/app_name" android:launchMode="singleInstance"
             android:configChanges="orientation|keyboardHidden">
                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />
                    <category android:name="android.intent.category.LAUNCHER" />
                </intent-filter>
            </activity>
            <activity android:name="org.sipdroid.sipua.ui.Sipdroid" android:label="@string/app_name" 
             android:configChanges="orientation|keyboardHidden">
            </activity>
      

  2.   

    有时候我们有三个活动 abc,如果我们希望只有ac 那么在b中startActivity().之后直接用finish。有时候我们希望abc之后只有bc之间的返回这时候可以考虑
    Intent.FLAG_ACTIVITY_NO_HISTORY.将a设置成这个 不让他在堆栈中。
    对于堆栈的顺序问题
    http://developer.android.com/intl/zh-CN/reference/android/content/Intent.html 
      

  3.   

    我是有两个class,不管我后台程序又没有关闭,点击图标都进入InputPIN这个class,怎么才能进入运行着的class呢?
      

  4.   

    是不是我android:launchMode="singleInstance"设的有问题啊?
      

  5.   

    Intent.FLAG_ACTIVITY_NO_HISTORY.将a设置成这个 不让他在堆栈中。
    对于堆栈的顺序问题
    http://developer.android.com/intl/zh-CN/reference/android/content/Intent.html