Zi 字媒體
2017-07-25T20:27:27+00:00
示範
XML
xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
android.support.constraint.ConstraintLayout>
JAVA
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Intent it=new Intent();
it.setAction(Intent.ACTION_VIEW);
Uri uri=Uri.parse("http://yahoo.com.tw");
it.setData(uri);
startActivity(it);
}
}
相關文章:
[Android] Android 學習總集
寫了
5860316篇文章,獲得
23313次喜歡