@Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    beamFragment =
        (BeamFragment) getSupportFragmentManager().findFragmentById(android.R.id.content);

    if (beamFragment == null) {
      beamFragment = new BeamFragment();

      getSupportFragmentManager()
          .beginTransaction()
          .add(android.R.id.content, beamFragment)
          .commit();
    }

    adapter = NfcAdapter.getDefaultAdapter(this);

    findViewById(android.R.id.content)
        .post(
            new Runnable() {
              public void run() {
                handleIntent(getIntent());
              }
            });
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // If we get created for the first time we get our data from the intent
    Bundle data = savedInstanceState != null ? savedInstanceState : getIntent().getExtras();
    session = (Session) data.getSerializable(Session.IDENTIFIER);

    ActionBar actionBar = getSupportActionBar();
    actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);

    ActionBar.Tab tab =
        getSupportActionBar()
            .newTab()
            .setText(R.string.info)
            .setTabListener(
                new TabListener<NodeListFragment>(this, "NodeList", NodeListFragment.class));
    actionBar.addTab(tab);

    if (session.getResult() != null) {
      tab =
          getSupportActionBar()
              .newTab()
              .setText(R.string.Result)
              .setTabListener(new TabListener<InfoFragment>(this, "Info", InfoFragment.class));
      actionBar.addTab(tab);
    }

    if (savedInstanceState != null)
      getSupportActionBar()
          .selectTab(getSupportActionBar().getTabAt(savedInstanceState.getInt("Tab", 0)));
  }
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    if ((getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK)
        == 4) mIsXLargeDevice = true;
  }
  @Override
  public void onCreate(Bundle savedInstanceState) {
    if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) {
      setTheme(R.style.Theme_Sherlock_Light);
    }

    super.onCreate(savedInstanceState);
    setContentView(R.layout.footer);

    viewPager = (ViewPager) findViewById(R.id.pager);
    viewPager.setOnPageChangeListener(onPageChangeListener);
    viewPager.setAdapter(new PagerAdapters(getSupportFragmentManager()));

    actionBar = getSupportActionBar();
    actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);

    actionBar.setDisplayShowTitleEnabled(true);

    Tab tab = actionBar.newTab().setText("Categories").setTabListener(new TabListnr());

    actionBar.addTab(tab);

    tab = actionBar.newTab().setText("My Posts").setTabListener(new TabListnr());

    actionBar.addTab(tab);
  }
Esempio n. 5
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.about_screen);

    stylefont = Typeface.createFromAsset(getAssets(), AppConstants.fontStyle);
    actionBar = getSupportActionBar();
    actionBar.setDisplayHomeAsUpEnabled(true);
    actionBar.setDisplayShowTitleEnabled(true);
    actionBar.setTitle("About");

    fontActionBar(actionBar.getTitle().toString());

    actionBar.setIcon(android.R.drawable.ic_menu_info_details);

    if (isNetworkAvailable()) {
      new GetAbout(this).execute();
    } else {
      Toast.makeText(this, "Please check your internet connection", Toast.LENGTH_SHORT).show();
    }
    about = (TextView) findViewById(R.id.about_text);
    developed = (TextView) findViewById(R.id.developed);
    developed.setTypeface(stylefont);
    about.setTypeface(stylefont);
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    this.setContentView(R.layout.activity_country);

    this.webImageManager = WebImageManager.getInstance(this);

    this.selectedCountry = null;

    this.listFragment =
        (CountryListFragment) this.getSupportFragmentManager().findFragmentById(R.id.list);
    this.detailsFragment = null;

    this.layoutDualPane = this.findViewById(R.id.details) != null;

    if (savedInstanceState != null) {
      Country country = savedInstanceState.getParcelable(CountryActivity.INSTANCE_STATE_COUNTRY);

      if (country != null) {

        if (this.layoutDualPane) {
          this.selectCountry(country);
        } else {
          this.selectedCountry = country;
        }
      }
    }
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.tdh_main);

    Button fullWebPageButton = (Button) findViewById(R.id.button1);
    fullWebPageButton.setOnClickListener(
        new OnClickListener() {
          // @Override
          public void onClick(View v) {
            fullWebPagePressed();
          }
        });

    Button mobileWebPageButton = (Button) findViewById(R.id.button2);
    mobileWebPageButton.setOnClickListener(
        new OnClickListener() {
          // @Override
          public void onClick(View v) {
            mobileWebPagePressed();
          }
        });

    getSupportActionBar().setDisplayHomeAsUpEnabled(true);
  }
Esempio n. 8
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    picturePosition = getIntent().getIntExtra(POSITION, 0);
    int mode = getIntent().getIntExtra(MODE, 0);

    setContentView(R.layout.ac_scale);
    Log.w("Position:" + picturePosition);

    pager = (ViewPager) findViewById(R.id.pager);

    adapter = new BigScreenAdapter(this, getSupportFragmentManager(), mode);
    pager.setAdapter(adapter);

    pager.setCurrentItem(picturePosition);

    // add save action bar item

    ActionBar actionBar = getActionBar();
    actionBar.setNavigationMode(ActionBar.DISPLAY_HOME_AS_UP);
    actionBar.setDisplayHomeAsUpEnabled(true);
    String stringExtra = getIntent().getStringExtra(AcAuthor.NAME);
    if (stringExtra != null) {
      actionBar.setTitle(stringExtra);
    }
    //        actionBar.setIcon(R.drawable.icon_v2_small);
    registerReceiver();
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    //	Toast.makeText(this, "onCreate ", Toast.LENGTH_SHORT).show();
    requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
    setContentView(R.layout.activity_map);
    // Show the Up button in the action bar.
    setupActionBar();

    // Getting Google Play availability status
    int status = GooglePlayServicesUtil.isGooglePlayServicesAvailable(getBaseContext());

    // Showing status
    if (status != ConnectionResult.SUCCESS) { // Google Play Services are
      // not available

      int requestCode = 10;
      Dialog dialog = GooglePlayServicesUtil.getErrorDialog(status, this, requestCode);
      dialog.show();

    } else { // Google Play Services are available
      // Getting reference to the SupportMapFragment of activity_main.xml
      SupportMapFragment fm =
          (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);

      // Getting GoogleMap object from the fragment
      googleMap = fm.getMap();

      // Enabling MyLocation Layer of Google Map
      googleMap.setMyLocationEnabled(true);

      googleMap.setOnInfoWindowClickListener(this);
    }
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.year_browser);
    // set the home button in actionbar
    ActionBar actionBar = getSupportActionBar();
    actionBar.setDisplayHomeAsUpEnabled(true);
    actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
    actionBar.setTitle("Courses by Year");

    ActionBar.Tab year1Tab = actionBar.newTab().setText("Year 1");
    ActionBar.Tab year2Tab = actionBar.newTab().setText("Year 2");
    ActionBar.Tab year3Tab = actionBar.newTab().setText("Year 3");
    ActionBar.Tab year4Tab = actionBar.newTab().setText("Year 4");
    ActionBar.Tab year5Tab = actionBar.newTab().setText("Year 5");

    Fragment year1Frag = new Year1Fragment();
    Fragment year2Frag = new Year2Fragment();
    Fragment year3Frag = new Year3Fragment();
    Fragment year4Frag = new Year4Fragment();
    Fragment year5Frag = new Year5Fragment();

    year1Tab.setTabListener(new YearTabsListener(year1Frag));
    year2Tab.setTabListener(new YearTabsListener(year2Frag));
    year3Tab.setTabListener(new YearTabsListener(year3Frag));
    year4Tab.setTabListener(new YearTabsListener(year4Frag));
    year5Tab.setTabListener(new YearTabsListener(year5Frag));

    actionBar.addTab(year1Tab);
    actionBar.addTab(year2Tab);
    actionBar.addTab(year3Tab);
    actionBar.addTab(year4Tab);
    actionBar.addTab(year5Tab);
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    mViewPager = new ViewPager(this);
    mViewPager.setId(R.id.pager);

    setContentView(mViewPager);

    AnalyticsUtils.getInstance(this).trackPageView("/Toll Rates");

    getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    getSupportActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);

    mTabsAdapter = new TabsAdapter(this, mViewPager);
    mTabsAdapter.addTab(
        getSupportActionBar().newTab().setText("SR 520"), SR520TollRatesFragment.class, null);
    mTabsAdapter.addTab(
        getSupportActionBar().newTab().setText("SR 16"), SR16TollRatesFragment.class, null);
    mTabsAdapter.addTab(
        getSupportActionBar().newTab().setText("SR 167"), SR167TollRatesFragment.class, null);

    if (savedInstanceState != null) {
      getSupportActionBar().setSelectedNavigationItem(savedInstanceState.getInt("tab", 0));
    }
  }
Esempio n. 12
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    setTheme(R.style.Theme_Sherlock_Light_DarkActionBar);
    super.onCreate(savedInstanceState);

    requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);

    setContentView(R.layout.activity_page_view);

    Bundle recdData = getIntent().getExtras();
    category = recdData.getString("category");
    currPos = recdData.getInt("position");

    getSupportActionBar().setTitle(category);
    getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    setSupportProgressBarIndeterminateVisibility(false);

    mAdapter =
        new MyAdapter(
            PageActivity.this, getSupportFragmentManager(), getApplicationContext(), category);

    mPager = (ViewPager) findViewById(R.id.pager);
    mPager.setAdapter(mAdapter);
    mPager.setOnPageChangeListener(mAdapter);
    mPager.setCurrentItem(currPos, true);
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_mapa_establecimientos);

    ActionBar ab = getSupportActionBar();
    ab.setDisplayOptions(
        ActionBar.DISPLAY_SHOW_TITLE | ActionBar.DISPLAY_SHOW_HOME | ActionBar.DISPLAY_HOME_AS_UP);

    mapa = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)).getMap();

    Bundle bundle = getIntent().getExtras();
    String municipio = bundle.getString("municipio");

    nombreMunicipio = (TextView) findViewById(R.id.nombreMunicipio);
    nombreMunicipio.setText(Utilities.getCamelCase(municipio));

    String nombre = bundle.getString("nombre");

    ctx = this;

    if (nombre == null) initMapaTodos(municipio);
    else initMapaUno();
    initClickMarker();
  }
Esempio n. 14
0
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.pincodelock);

    Intent intent = getIntent();
    mActivity = intent.getStringExtra(EXTRA_ACTIVITY);

    mBCancel = (Button) findViewById(R.id.cancel);
    mPinHdr = (TextView) findViewById(R.id.pinHdr);
    mPinHdrExplanation = (TextView) findViewById(R.id.pinHdrExpl);
    mText1 = (EditText) findViewById(R.id.txt1);
    mText1.requestFocus();
    getWindow().setSoftInputMode(android.view.WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE);
    mText2 = (EditText) findViewById(R.id.txt2);
    mText3 = (EditText) findViewById(R.id.txt3);
    mText4 = (EditText) findViewById(R.id.txt4);

    SharedPreferences appPrefs =
        PreferenceManager.getDefaultSharedPreferences(getApplicationContext());

    // Not PIN Code defined yet.
    // In a previous version settings is allow from start
    if ((appPrefs.getString("PrefPinCode1", null) == null)) {
      setChangePincodeView(true);
      mPinCodeChecked = true;
      mNewPasswordEntered = true;

    } else {

      if (appPrefs.getBoolean("set_pincode", false)) {
        // pincode activated
        if (mActivity.equals("preferences")) {
          // PIN has been activated yet
          mPinHdr.setText(R.string.pincode_configure_your_pin);
          mPinHdrExplanation.setVisibility(View.VISIBLE);
          mPinCodeChecked = true; // No need to check it
          setChangePincodeView(true);
        } else {
          // PIN active
          mBCancel.setVisibility(View.INVISIBLE);
          mBCancel.setVisibility(View.GONE);
          mPinHdr.setText(R.string.pincode_enter_pin_code);
          mPinHdrExplanation.setVisibility(View.INVISIBLE);
          setChangePincodeView(false);
        }

      } else {
        // pincode removal
        mPinHdr.setText(R.string.pincode_remove_your_pincode);
        mPinHdrExplanation.setVisibility(View.INVISIBLE);
        mPinCodeChecked = false;
        setChangePincodeView(true);
      }
    }
    setTextListeners();

    ActionBar actionBar = getSupportActionBar();
    actionBar.setIcon(DisplayUtils.getSeasonalIconId());
  }
Esempio n. 15
0
 /**
  * A SubClass should override the following functions instead of override this function.
  *
  * @see #preInitUI();
  * @see #initUI();
  * @see #postInitUI();
  */
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   preLoadData(savedInstanceState);
   preInitUI();
   initUI();
   postInitUI();
 }
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setContentView(R.layout.activity_gallery);
   getSupportActionBar().setDisplayHomeAsUpEnabled(true);
   items = Building.createList(this);
   rebuildList(savedInstanceState);
 }
  @Override
  protected void onCreate(Bundle arg0) {
    super.onCreate(arg0);
    setContentView(R.layout.activity_change_pwd);

    initWidget();
    setupActionBar();
  }
Esempio n. 18
0
 @Override
 public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setContentView(R.layout.main);
   croutonPager = (ViewPager) findViewById(R.id.crouton_pager);
   croutonPager.setAdapter(new CroutonPagerAdapter(getSupportFragmentManager()));
   ((TitlePageIndicator) findViewById(R.id.titles)).setViewPager(croutonPager);
 }
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   // TODO Auto-generated method stub
   super.onCreate(savedInstanceState);
   setContentView(R.layout.claro_tv_banner);
   this.getSupportActionBar().setDisplayHomeAsUpEnabled(true);
   UIUtils.stylizeActionBar(this);
 }
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setTitle(R.string.title_posting_new_topic);
   setContentView(R.layout.topic_editing_layout);
   Intent intent = new Intent(this, RCService.class);
   bindService(intent, mConnection, Context.BIND_AUTO_CREATE);
 }
Esempio n. 21
0
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   //		new UpgradeManager(this).checkandupdate();
   MobclickAgent.updateOnlineConfig(this);
   MobclickAgent.openActivityDurationTrack(false);
   initContentview();
   initMenuview();
 }
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   FragmentManager fm = getSupportFragmentManager();
   if (fm.findFragmentById(android.R.id.content) == null) {
     ToDoPreviewFragment f = new ToDoPreviewFragment();
     fm.beginTransaction().add(android.R.id.content, f).commit();
   }
 }
Esempio n. 23
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.help);

    getPrefs();
    bindViews();
    initState();
  }
  @Override
  public void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    activityHelper.onCreate(this, savedInstanceState);

    activityHelper.addTab(this, history, null, R.id.main_layout);
    activityHelper.addTab(this, saved_history, null, R.id.main_layout);
  }
Esempio n. 25
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    if (BuildConfig.DEBUG && Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) {
      StrictMode.setThreadPolicy(buildPolicy());
    }
  }
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    LinearLayout variableBox = (LinearLayout) findViewById(R.id.contentArea);
    variableBox.removeAllViewsInLayout();

    setActionBar();
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    LanguageChange.selectLocale(this);

    if (savedInstanceState == null) {
      DialogFragment dialogFragment = ScheduleCacheDeleteSettingsDialog.newInstance();
      dialogFragment.show(getSupportFragmentManager(), "dialog");
    }
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    FrameLayout frame = new FrameLayout(this);
    frame.setId(CONTENT_VIEW_ID);
    setContentView(frame, new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));

    if (savedInstanceState == null) {
      setInitialFragment();
    }
  }
Esempio n. 29
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);

    // Getting status
    int status = GooglePlayServicesUtil.isGooglePlayServicesAvailable(getBaseContext());

    // Showing status
    if (status == ConnectionResult.SUCCESS) {

    } else {

      int requestCode = 10;
      Dialog dialog = GooglePlayServicesUtil.getErrorDialog(status, this, requestCode);
      dialog.show();
      return;
    }

    // requestWindowFeature(Window.FEATURE_ACTION_BAR_OVERLAY);
    if (savedInstanceState != null) {
      allTapItem = (ArrayList<OSMNode>) savedInstanceState.get("allTapItem");
      allToiletItem = (ArrayList<OSMNode>) savedInstanceState.get("allToiletItem");
      allFoodItem = (ArrayList<OSMNode>) savedInstanceState.get("allFoodItem");
    }
    // TODO Semi-Transparent Action Bar
    // requestWindowFeature(Window.FEATURE_ACTION_BAR_OVERLAY);
    // getSupportActionBar().setBackgroundDrawable(getResources().getDrawable(R.drawable.ab_bg_black));

    setContentView(R.layout.activity_main);
    configureActionBar();
    FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
    mMapFragment = getSupportFragmentManager().findFragmentByTag("map");
    if (mMapFragment == null) {
      // If not, instantiate and add it to the activity
      mMapFragment = new ViewMapFragment_();
      ft.add(R.id.container, mMapFragment, "map").commit();
    } else {
      // If it exists, simply attach it in order to show it
      ft.show(mMapFragment).commit();
    }
    TapForTap.initialize(this, "ef3209aec5ac8e0eb9682b8890b20a78");
    adview = (AdView) findViewById(R.id.adView);
    adview.setAdListener(this);
    ImageButton imgbtn = (ImageButton) findViewById(R.id.closeadbtn);
    imgbtn.setVisibility(View.GONE);

    // Initiate a generic request to load it with an ad
    AdRequest request = new AdRequest();
    adview.loadAd(request);

    // Search markers
    searchMarkers = new ArrayList<Marker>();
  }
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    if (getSupportFragmentManager().findFragmentById(android.R.id.content) == null) {
      String file = getIntent().getStringExtra(EXTRA_FILE);
      Fragment f = SimpleContentFragment.newInstance(file);

      getSupportFragmentManager().beginTransaction().add(android.R.id.content, f).commit();
    }
  }