Nimbuzzmasters forum
nwlve HI   GUEST nwlve
WELCOME TO NIMBUZZ MASTERS FORUM
PLEASE   REGISTER

TO
Dzs HAVE FULL ACCESS TO THE FORUM AND BE ABLE TO DOWNLOAD STUFF Dzs
Grp
STAY WITH US THANK YOU
Forum management ©️
Mzs
Nimbuzzmasters forum

The forum of the nimbuzz forums


You are not connected. Please login or register

 
 

Tutorial: Android: button_ul Android

Message (Page 1 of 1)

Aaryan
 
Member
Member

Posted on Sun Feb 26, 2017 7:49 am

 

*
POPULAR

MainActivity

LOCATION: java/MainActivity.java
Code:
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.widget.Button;
import android.view.View;
import android.view.View.OnClickListener;

public class MyAndroidAppActivity extends Activity {

Button button;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

addListenerOnButton();

}

public void addListenerOnButton() {

button = (Button) findViewById(R.id.button1);

button.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {

Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.google.com"));
startActivity(browserIntent);

}
});
}
}
activity_main

LOCATION: res/layout/activity_main.xml
Code:
<LinearLayout xmlns:android="http:// schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >

<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button"
android:layout_gravity="center_horizontal"/>

</LinearLayout>



View user profile


TOP-CODER
 
Management team
Management team

Posted on Tue Feb 28, 2017 7:33 pm

 
 Tutorial: Android: button_ul Android Images?q=tbn:ANd9GcR2e_feR8batEYkrCRN-11QoRNfzokPDdrXrinOapTRQpiuOLfvhHaM-A



View user profile http://www.hackersw0rld.tk


Message (Page 1 of 1)

Similar topics

-

» IE9 and Selenium

Permissions in this forum:
You cannot reply to topics in this forum


  • Total Posts:
  • Total Members:
  • Newest Member:
  • Most Online: Most users ever online was 540 on Tue Jan 19, 2016 9:39 pm

In total there is 0 user online :: 0 Registered, 0 Hidden and 0 Guests
Users browsing this forum: None