lop*_*ael 0 android toolbar material-design
我想用Twitter App等徽标替换工具栏中的标题.
我想我们可以像这样以编程方式替换它:
mToolbar = (Toolbar) findViewById(R.id.app_toolbar);
mToolbar.setLogo(R.drawable.ic_logo);
Run Code Online (Sandbox Code Playgroud)
但我想直接在我的XML工具栏声明中替换它,但我看不到属性app:logo或android:logo.
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/app_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorPrimary"
android:minHeight="?attr/actionBarSize"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
app:theme="@style/MyCustomToolBarTheme" />
Run Code Online (Sandbox Code Playgroud)
请帮帮我,谢谢.
| 归档时间: |
|
| 查看次数: |
2036 次 |
| 最近记录: |