2014-10-30 38 views
0

我想幫助我自定義我的操作欄,我正在使用導航抽屜,並希望當你打開操作欄是黑暗的時候有選項。定製actionbar安卓誰新Playstore風格

我也想知道如何自定義一個imageview拍照並將名稱移動到右側和playstore。

謝謝你的幫助。

enter image description here

編輯

我解決

 actionBar = getActionBar(); 
     toggle = new ActionBarDrawerToggle(this, drawerMenu, R.drawable.ic_drawer,   R.string.texto_menu_opciones, R.string.texto_lineas_transporte){ 
      @Override 
      public void onDrawerClosed(View drawerView) { 
       getActionBar().setTitle(listaOpciones.get(position).getNombre()); 
       getActionBar().setBackgroundDrawable(getResources().getDrawable(R.drawable.ab_solid_cvbus)); 
       invalidateOptionsMenu(); 
      } 

      @Override 
      public void onDrawerOpened(View drawerView) { 
       //getActionBar().setTitle("Opciones"); 
       getActionBar().setTitle(listaOpciones.get(position).getNombre()); 
       getActionBar().setBackgroundDrawable(getResources().getDrawable(R.drawable.ab_transparent_cvbus)); 
       invalidateOptionsMenu(); 
      } 

      @Override 
      public void onDrawerSlide(View drawerView, float slideOffset) 
      { 
       super.onDrawerSlide(drawerView, slideOffset); 
      } 
     }; 

回答

0

,你可以把這個代碼改變動作條的顏色

ActionBar ac= getActionBar(); 
    ac.setBackgroundDrawable(new ColorDrawable(Color.parseColor("#000000"))); // #000000 - for black 

將此代碼放在抽屜打開方法..