Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Button Maps=(Button)findViewById(R.id.btnMap);
- Maps.setOnClickListener(new View.OnClickListener() {
- public void onClick(View arg0) {
- Intent intent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse("https://maps.google.com/maps?saddr="+lati0+","+longi0+"&daddr="+lati+","+longi));
- startActivity(intent);
- }});
- Button Call=(Button)findViewById(R.id.btnCall);
- Call.setOnClickListener(new View.OnClickListener() {
- public void onClick(View arg0) {
- String toDial="tel:"+telp;
- startActivity(new Intent(Intent.ACTION_DIAL,Uri.parse(toDial)));
- }});
- Button Sms=(Button)findViewById(R.id.btnSms);
- Sms.setOnClickListener(new View.OnClickListener() {
- public void onClick(View arg0) {
- Intent i= new Intent(detail.this, Sms.class);
- startActivity(i);
- }});
- Button Web=(Button)findViewById(R.id.btnWeb);
- Web.setOnClickListener(new View.OnClickListener() {
- public void onClick(View arg0) {
- Intent intent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(url));
- startActivity(intent);
- }});
- Button Youtube=(Button)findViewById(R.id.btnYoutube);
- Youtube.setOnClickListener(new View.OnClickListener() {
- public void onClick(View arg0) {
- Intent i= new Intent(detail.this, Youtube.class);
- startActivity(i);
- }});
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement