我有一个简单的应用程序,我想让我制作的按钮通过浏览器启动特定的URL。你们能给我一些信息来帮助我实现吗?就像我说的,我已经在我的应用程序中添加了该按钮。这是代码 - 如果需要其他信息,请告诉我。
.java文件
package reseeveBeta.mpi.dcasey;
import android.app.Activity;
import android.os.Bundle;
public class ReseeveBetaActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
}
.XML
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Welcome to Reseeve, tap register to begin account creation" />
<Button
android:id="@+id/button1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Register" />
<EditText
android:id="@+id/editText1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="textMultiLine"
android:text="If you already have and account, please login below" >
<requestFocus />
</EditText>
</LinearLayout>
} }
` - user1301764