import android.content.Intent;
import android.net.Uri;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.widget.*;
public class ContactActivty extends AppCompatActivity {
Button callbt;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate( savedInstanceState );
setContentView( com.solutionsatoz.mapapplication.R.layout.activity_contact_activty );
Toolbar mToolbar = (Toolbar) findViewById( com.solutionsatoz.mapapplication.R.id.toolbar );
setSupportActionBar( mToolbar );
callbt = (Button) findViewById( com.solutionsatoz.mapapplication.R.id.callButton );
callbt.setOnClickListener( new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent callbt = new Intent( Intent.ACTION_DIAL );
callbt.setData( Uri.parse( "tel:9512771188" ) );
startActivity( callbt );
}
});
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater mMenuInflater = getMenuInflater();
mMenuInflater.inflate(com.solutionsatoz.mapapplication.R.menu.gmi_menu,menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
if(item.getItemId() == com.solutionsatoz.mapapplication.R.id.action_home){
Intent intent4 = new Intent(ContactActivty.this, MainActivity.class);
startActivity(intent4);
}
if(item.getItemId() == com.solutionsatoz.mapapplication.R.id.action_about_gmi){
Intent intent5 = new Intent(ContactActivty.this, AboutGMICenter.class);
startActivity(intent5);
}
if(item.getItemId() == com.solutionsatoz.mapapplication.R.id.action_location){
Intent intent6 = new Intent(ContactActivty.this, MapsActivity.class);
startActivity(intent6);
}
if(item.getItemId() == com.solutionsatoz.mapapplication.R.id.action_contact){
Intent intent7 = new Intent(ContactActivty.this, ContactActivty.class);
startActivity(intent7);
}
return super.onOptionsItemSelected(item);
}
}
No. | Subject | Author | Date | Views |
---|---|---|---|---|
48 | Add AdView to the layout | admin | 2017.07.21 | 1550 |
47 | map api | admin | 2017.06.04 | 1268 |
46 | Import the Mobile Ads SDK | admin | 2017.07.21 | 1017 |
45 | Load an ad | admin | 2017.07.21 | 973 |
44 | Website icon | admin | 2017.09.16 | 905 |
43 | Android Application Development | admin | 2017.07.28 | 847 |
42 | Contact Layout | admin | 2017.06.06 | 336 |
41 | Manifest | admin | 2017.06.04 | 241 |
40 | Image Center | admin | 2017.07.21 | 219 |
39 | package com.solatoz.joseph.uscitizenshiptest; | admin | 2017.07.01 | 217 |
38 | Custom Swipe | admin | 2017.06.04 | 211 |
37 | US1800s | admin | 2017.07.03 | 210 |
36 | Recent American History | admin | 2017.07.03 | 210 |
35 | System of Government | admin | 2017.07.03 | 210 |
34 | Symbols And Holidays | admin | 2017.07.03 | 208 |
33 | Colonial Period And Independence | admin | 2017.07.03 | 204 |
32 | Geography | admin | 2017.07.03 | 200 |
31 | AdMob - Import the Mobile Ads SDK | admin | 2017.07.21 | 192 |
30 | Rights And Responsibilities | admin | 2017.07.03 | 188 |
29 | Principles of American Democracy | admin | 2017.07.02 | 185 |