androidアプリでブラウザに移動する際に
lang
1 2 public void onClick(View v) { 3 Uri uri = Uri.parse("http://google.com"); 4 Intent i = new Intent(Intent.ACTION_VIEW,uri); 5 startActivity(i); 6 } 7
これを使用しますよね。
これを使用する際に、Manifestをいじる必要がありますか?
触ってないのでブラウザが起動しないのでしょうか?
そして、上記のコードを使用するActivityの.xmlファイルは
無記入でよろしいのでしょうか?
lang
1<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 2 xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" 3 android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin" 4 android:paddingRight="@dimen/activity_horizontal_margin" 5 android:paddingTop="@dimen/activity_vertical_margin" 6 android:paddingBottom="@dimen/activity_vertical_margin" 7 tools:context="--------------------"> 8 9 10</RelativeLayout> 11
教えてください。よろしくお願いします。
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。