import android.content.Intent;
import android.support.v4.view.ViewPager;
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;
public class AboutGMICenter extends AppCompatActivity {
ViewPager viewPager;
CustomSwipeAdapter adapter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(com.solutionsatoz.mapapplication.R.layout.activity_about_gmicenter);
Toolbar mToolbar = (Toolbar) findViewById(com.solutionsatoz.mapapplication.R.id.toolbar);
setSupportActionBar(mToolbar);
viewPager = (ViewPager)findViewById(com.solutionsatoz.mapapplication.R.id.view_pager);
adapter = new CustomSwipeAdapter(this);
viewPager.setAdapter(adapter);
}
@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(AboutGMICenter.this, MainActivity.class);
startActivity(intent4);
}
if(item.getItemId() == com.solutionsatoz.mapapplication.R.id.action_about_gmi){
Intent intent5 = new Intent(AboutGMICenter.this, AboutGMICenter.class);
startActivity(intent5);
}
if(item.getItemId() == com.solutionsatoz.mapapplication.R.id.action_location){
Intent intent6 = new Intent(AboutGMICenter.this, MapsActivity.class);
startActivity(intent6);
}
if(item.getItemId() == com.solutionsatoz.mapapplication.R.id.action_contact){
Intent intent7 = new Intent(AboutGMICenter.this, ContactActivty.class);
startActivity(intent7);
}
return super.onOptionsItemSelected(item);
}
}
No. | Subject | Author | Date | Views |
---|---|---|---|---|
28 | Strings | admin | 2017.06.02 | 56 |
27 | Activity About Center (layout) | admin | 2017.06.02 | 58 |
» | About GMI Center | admin | 2017.06.04 | 58 |
25 | Contact Activity | admin | 2017.06.02 | 59 |
24 | Contact Activity Layout | admin | 2017.06.02 | 61 |
23 | Contact Activity | admin | 2017.06.04 | 66 |
22 | Main Activity Layout | admin | 2017.06.02 | 70 |
21 | AndroidManifest.xml | solatoz | 2017.06.02 | 92 |
20 | Principles of American Democracy | admin | 2017.07.02 | 191 |
19 | Rights And Responsibilities | admin | 2017.07.03 | 196 |
18 | AdMob - Import the Mobile Ads SDK | admin | 2017.07.21 | 200 |
17 | Geography | admin | 2017.07.03 | 209 |
16 | System of Government | admin | 2017.07.03 | 214 |
15 | Colonial Period And Independence | admin | 2017.07.03 | 214 |
14 | Symbols And Holidays | admin | 2017.07.03 | 217 |
13 | Custom Swipe | admin | 2017.06.04 | 219 |
12 | US1800s | admin | 2017.07.03 | 219 |
11 | Recent American History | admin | 2017.07.03 | 222 |
10 | package com.solatoz.joseph.uscitizenshiptest; | admin | 2017.07.01 | 224 |
9 | Image Center | admin | 2017.07.21 | 229 |