Give me a clear idea on what your trying to do... Lets say you want a button in your main.xml file. Ad your button to the view. It should look something like this
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android

rientation="vertical" >
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button" />
</LinearLayout>
The above is your main.xml with a button in it. After doing that, close the main.xml file. Go to src> com.package and open your Main.java class, or what ever you named your app/activity.java class. But for now I'll call it Main.java... It should look like this
package com.package.name;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.Button;
public class Main extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.main);<--- this line of code tells your class this is the xml
file your working on...
Button cleverbot = (Button) findViewById(R.id.button1);
cleverbot.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) { /// make sure it reads (View view) not (View v)
// TODO Auto-generated method stub
Uri uriUrl = Uri.parse("https://cleverbot.com/-i_am_cleverbot"

;
Intent launchBrowser = new Intent(Intent.ACTION_VIEW, uriUrl);
startActivity(launchBrowser);
}
});
}
}
This should work....
Also, in your manifest. Make sure you use permission--->
<uses-permission android:name="android.permission.INTERNET"/>