Answer the question
In order to leave comments, you need to log in
Why doesn't site call work in android?
There is such code in menu/main.xml
<?xml version="1.0" encoding="utf-8"?>
<menu
xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/item"
android:icon="@drawable/ic_logo"
android:showAsAction="always"
android:title="@string/item1"
android:onClick="Click"
>
</item>
</menu>
public void Click(View view) {
Uri address = Uri.parse("http://example.ru");
Intent openling = new Intent(Intent.ACTION_VIEW, address);
startActivity(openling);
}
Answer the question
In order to leave comments, you need to log in
You need at least an error log. most likely departure to
Uri address = Uri.parse(" example.ru ");
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question