Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("http://www.stackoverflow.com"));
startActivity(intent);
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="50dip"
android:layout_width="fill_parent"
android:layout_weight="0">
<ImageView
android:layout_height="50dip"
android:layout_width="50dip"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"/>
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_centerInParent="true"
android:text="some text"/>
<ImageView
android:layout_height="50dip"
android:layout_width="50dip"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"/>
</RelativeLayout>
本文介绍了一种在Android应用中使用Intent打开外部网页的方法,并展示了如何通过RelativeLayout实现一个包含居中文本及两侧图像的简单布局。
1372

被折叠的 条评论
为什么被折叠?



