2017-04-05 41 views
0

我想在我的頂欄Android應用相應調整的圖標我頂欄在左側image我想在我的Android應用程序相應調整該圖標在頂欄

它有一些側面菜單側邊菜單圖標後空的空間,我想安排相應的圖標,以填補這一空間,但我不知道該怎麼做

請幫我避免空的空間,把圖標在那個地方

我也附加了圖片以獲得更好的視野

謝謝

+0

請顯示您的佈局 –

+0

如果您可以使用工具欄,然後按照此鏈接http://stackoverflow.com/questions/26455027/android-api-21-toolbar-padding –

回答

0

請嘗試創建一個自定義佈局的行動吧&誇大它。

0

您可以使用setlogo法工具欄,以填補所需空間

toolbar.setLogo(R.drawable.yourlogo); 

或只需根據您的要求設置您的工具欄裏面的所有圖標。 這樣的

<android.support.v7.widget.Toolbar 
    android:layout_width="match_parent" 
    android:layout_height="?attr/actionBarSize"> 
    <LinearLayout 
     android:layout_width="wrap_content" 
     android:orientation="horizontal" 
     android:layout_height="wrap_content"> 
     <ImageView 
      android:layout_width="wrap_content" 
      android:background="@mipmap/ic_launcher" 
      android:layout_height="wrap_content" /> 
     <ImageView 
      android:layout_width="wrap_content" 
      android:background="@mipmap/ic_launcher" 
      android:layout_height="wrap_content" /> 
     <ImageView 
      android:layout_width="wrap_content" 
      android:background="@mipmap/ic_launcher" 
      android:layout_height="wrap_content" /> 
     <ImageView 
      android:layout_width="wrap_content" 
      android:background="@mipmap/ic_launcher" 
      android:layout_height="wrap_content" /> 
     <ImageView 
      android:layout_width="wrap_content" 
      android:background="@mipmap/ic_launcher" 
      android:layout_height="wrap_content" /> 
    </LinearLayout> 

</android.support.v7.widget.Toolbar> 

希望得到這個幫助!

相關問題