嗨
我写了一个小程序,将打开默认浏览器并直接导入到URL。我的问题是,当我点击Android的后退按钮,它会返回一个空白页,我能怎样改变退出程序,而不是回归到一个空白页Android - Android的后退按钮问题
的代码以供参考:
package com.example.helloandroid;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.widget.TextView;
public class HelloAndroid extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Intent httpIntent = new Intent(Intent.ACTION_VIEW);
httpIntent.setData(Uri.parse("http://www.bbc.co.uk/"));
startActivity(httpIntent);
}
}