@Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    actionBar = getSupportActionBar();
    actionBar.setDefaultDisplayHomeAsUpEnabled(true);
    actionBar.setLogo(R.drawable.minion);
    setContentView(R.layout.activity_test);
    itemList = getResources().getStringArray(R.array.itemList);
    drawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
    drawerList = (ListView) findViewById(R.id.left_drawer);
    drawerList.setAdapter(new ArrayAdapter<String>(this, R.layout.drawer_list_item, itemList));
    drawerList.setOnItemClickListener(new SlideMenuClickListener());
    //   actionBar=getSupportActionBar();
    // actionBar.show();
    // actionBar.setLogo(R.drawable.ic_drawer);
    // getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    // getSupportActionBar().setHomeButtonEnabled(true);

    /* drawerToggle = new ActionBarDrawerToggle(this, drawerLayout,R.drawable.ic_drawer,R.string.drawer_open, R.string.drawer_close ){
        @Override
        public void onDrawerClosed(View drawerView) {
            invalidateOptionsMenu(); // calls onPrepareOptionsMenu()
        }

        @Override
        public void onDrawerOpened(View drawerView) {
            invalidateOptionsMenu(); // calls onPrepareOptionsMenu()
        }
    };*/
  }
Example #2
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_material_up_concept);
    ButterKnife.bind(this);

    Toolbar toolbar = (Toolbar) findViewById(R.id.materialup_toolbar);
    AppBarLayout appBarLayout = (AppBarLayout) findViewById(R.id.materialup_appbar);
    toolbar.setNavigationOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            onBackPressed();
          }
        });
    toolbar.setTitle("");
    setSupportActionBar(toolbar);
    ActionBar actionBar = getSupportActionBar();
    actionBar.setDefaultDisplayHomeAsUpEnabled(true);
    actionBar.setDisplayHomeAsUpEnabled(true);
    appBarLayout.addOnOffsetChangedListener(this);
    mMaxScrollSize = appBarLayout.getTotalScrollRange();

    mProfileImage = (ImageView) findViewById(R.id.materialup_profile_image);
    mUserId = (TextView) findViewById(R.id.materialup_user_id);
    mBackDrop = (ImageView) findViewById(R.id.materialup_profile_backdrop);

    new GetUserInfo(this).execute();
  }
 private void createNewAddress() {
   CreateAddressFormFragment localCreateAddressFormFragment = new CreateAddressFormFragment();
   localCreateAddressFormFragment.setTargetFragment(this, 2000);
   Object localObject = new Bundle();
   ((Bundle) localObject).putBoolean("ICartConstant.KEYS.EXPRESS_CHECKOUT", true);
   ((Bundle) localObject).putString("ICartConstant.KEYS.ADDRESS_SCREEN_TITLE", "Add Address");
   localCreateAddressFormFragment.setArguments((Bundle) localObject);
   localObject = ((MyAccountActivity) getActivity()).getSupportActionBar();
   if (localObject != null) {
     ((ActionBar) localObject).setDefaultDisplayHomeAsUpEnabled(true);
     ((ActionBar) localObject).setDisplayHomeAsUpEnabled(true);
     ((ActionBar) localObject).setTitle(getString(2131165270));
   }
   getFragmentManager()
       .beginTransaction()
       .add(2131558581, localCreateAddressFormFragment)
       .addToBackStack(null)
       .commit();
 }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_historia_clinica_principal);
    Intent dato = getIntent();
    idOdontologo = dato.getStringExtra("idOdontologo");
    ActionBar actionBar = getSupportActionBar();
    actionBar.show();

    actionBar.setDefaultDisplayHomeAsUpEnabled(true);
    txtCedulaPaciente = (TextView) findViewById(R.id.txtCedulaPaciente);
    progressBar = (ProgressBar) findViewById(R.id.progressBar);
    progressBar.setVisibility(View.INVISIBLE);

    mPanes = (SlidingPaneLayout) findViewById(R.id.slidingPane);
    ListView list = (ListView) findViewById(R.id.animalList);
    adapter = new ListViewAdapter(this, opciones, imgOpciones);
    list.setAdapter(adapter);
    list.setBackgroundColor(Color.rgb(178, 223, 219));
    list.setOnItemClickListener(
        new AdapterView.OnItemClickListener() {
          @Override
          public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
            switch (position) {
              case 0:
                Intent consultorio = new Intent(getApplicationContext(), Consultorio.class);

                consultorio.putExtra("idOdontologo", idOdontologo);
                startActivity(consultorio);
                finish();
                break;
              case 1:
                Intent infoGeneral = new Intent(getApplicationContext(), InfoGeneral.class);
                infoGeneral.putExtra("idOdontologo", idOdontologo);
                startActivity(infoGeneral);
                finish();
                break;
            }
          }
        });
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    // Init data-binding.
    mBinding = DataBindingUtil.setContentView(this, LAYOUT);
    // Init application basic elements.
    setUpErrorHandling((ViewGroup) findViewById(R.id.error_content));

    // App-bar.
    setSupportActionBar(mBinding.toolbar);
    mBinding.toolbar.setTitle(R.string.lbl_my_location_list);
    ActionBar actionBar = getSupportActionBar();
    actionBar.setDisplayHomeAsUpEnabled(true);
    actionBar.setDefaultDisplayHomeAsUpEnabled(true);

    // List of gallery.
    ScreenSize screenSize = DeviceUtils.getScreenSize(App.Instance);
    mBinding.listRv.setLayoutManager(new GridLayoutManager(this, GRID_COL_COUNT));
    mAdp =
        new MyLocationListAdapter(
            MyLocationManager.getInstance().getCachedList(), GRID_COL_COUNT, screenSize.Width);
    mBinding.listRv.setAdapter(mAdp);
  }
Example #6
0
  public void setBar() {

    toolbar = (Toolbar) findViewById(R.id.bar_friends);
    toolbar.setTitle("Amigos");
    toolbar.setTitleTextColor(getResources().getColor(R.color.colorWhite));
    setSupportActionBar(toolbar);
    final ActionBar actionBar = getSupportActionBar();
    if (actionBar != null) {
      actionBar.setDefaultDisplayHomeAsUpEnabled(true);
      actionBar.setDisplayHomeAsUpEnabled(true);
    }

    floatingActionButton = (FloatingActionButton) findViewById(R.id.fab_friends);
    floatingActionButton.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View view) {
            Intent data = new Intent(friends.this, add_category.class);
            startActivity(data);
            finish();
          }
        });
  }