Android 三星S4 4.4.2系统 ToolBar设置左侧返回键,按钮顶部出现margin,按钮下移。
迷茫
迷茫 2017-04-17 17:51:39
0
0
834

ToolBar设置左侧返回键,按钮顶部出现margin,按钮下移:

  • 布局文件

<android.support.v7.widget.Toolbar
                android:id="@+id/my_collection_tool"
                android:layout_width="match_parent"
                android:layout_height="?android:attr/actionBarSize"
                app:contentInsetStart="0dp"
                app:navigationIcon="@drawable/ic_arrow_back_white_24dp"
                app:layout_scrollFlags="scroll|enterAlways"
                app:titleTextColor="@color/white" />
  • 代码

setSupportActionBar(mBinding.myCollectionTool);
        getSupportActionBar().setTitle(title);
  • UI效果

5.X、6.X、7.X均显示正常。

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

Antworte allen(0)
Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage
Über uns Haftungsausschluss Sitemap
Chinesische PHP-Website:Online-PHP-Schulung für das Gemeinwohl,Helfen Sie PHP-Lernenden, sich schnell weiterzuentwickeln!