【发布时间】:2018-09-29 06:49:26
【问题描述】:
我一直在寻找使用样式或以编程方式执行此操作的不同方法,但没有一种方法有效。是否可以通过任何方式增加此图标的大小?
工具栏:
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:background="@color/color_primary"
android:layout_width="match_parent"
android:layout_height="@dimen/toolbar_h">
<RelativeLayout
android:id="@+id/toolbar_wrapper"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:clickable="true"
android:focusable="true"
....
活动:
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:orientation="vertical">
<include
layout="@layout/toolbar"/>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v4.widget.DrawerLayout
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:openDrawer="end">
....
活动代码:
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
binding = DataBindingUtil.setContentView(this, R.layout.activity_skeleton)
val toggle = object : ActionBarDrawerToggle(this, drawer, toolbar, R.string.nd_open, R.string.nd_close) {}
drawer.addDrawerListener(toggle)
toggle.syncState()
}
【问题讨论】:
标签: android android-toolbar android-styles navigation-drawer android-icons