English 中文(简体)
如何通过点击一个创建的纽顿来撤销整个申请? [复制]
原标题:How to exit the whole application by clicking one created button? [duplicate]
  • 时间:2012-05-17 06:58:15
  •  标签:
  • java
  • android

我正在我的 app中建立一个纽州,并通过点击这个纽州,所有各州都将得到拯救,用户将退出整个申请。 当用户对电灯进行重新扫描时,他/她应被带到主要活动。 我曾尝试过“完成”和“系统”(0)”,但这两项职能只是结束目前的活动,使我了解以前的活动......如何能够做到这一点? 感谢。

问题回答

Move to Back将掩盖你的申请。 页: 1

最好依靠安乐施会来决定何时需要杀手。

摘录以下关于终止申请的法规。 活动先明确,然后使用旗帜,然后使用完成法。

 Intent intent = new Intent(getApplicationContext(), FinishActivity.class).setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
            finish();
            startActivity(intent);

在Create(Create)的“FinishActative”类中,最简单的是书写完成()方法

public class FinishActivity extends Activity {

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    finish();
iii

iii





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签