bundle.putString(Intent_url,urlInfo + token);
editor.commit();
intent.putExtra("bundle", bundle);
startActivityForResult(intent,0);
}
urlConn.disconnect();
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
}
successactivity

<?xml version="1.0"encoding="utf-8"?>
<LinearLayoutxmlns:android=" "
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/textView"
android:layout_width="fill_parent"
android:layout_height="50dp"
/>
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="点击按钮返回"
/>
<WebView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/webView"
/>
</LinearLayout>
public class SuccessActivity extendsAppCompatActivity {
private Button button=null;
private TextView textView =null;
private WebView webView;
private String url = "";
private String text = "";
private class ButtonListener implements OnClickListener {
@Override
public void onClick(View v) {
switch (v.getId()){
case R.id.button:
Intent intent =getIntent();
Bundle bundle =newBundle();
bundle.putString("return","return fromSuccessActivity!");
本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/shouji/article-85138-6.html
美国是全世界的政府