2017-04-05 58 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> 

希望得到这个帮助!

相关问题