自定义toolbar问题
老师我自定义了一个toolbar,在应用时却显示不出来
下边是代码
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | <? xml version = "1.0" encoding = "utf-8" ?> < android.support.constraint.ConstraintLayout xmlns:android = "http://schemas.android.com/apk/res/android" xmlns:app = "http://schemas.android.com/apk/res-auto" xmlns:tools = "http://schemas.android.com/tools" android:layout_width = "match_parent" android:layout_height = "match_parent" tools:context = ".HomeActivity" > <!-- ?attr/actionBarSize:表示根据屏幕的分辨率采用系统默认的高度 如果低版本也要使用的话,则需要使用v7包的,否则只有api21上才能有效 --> < com.zhanlu.share.MyToolbar android:id = "@+id/toobar" android:layout_width = "match_parent" android:layout_height = "wrap_content" android:minHeight = "?attr/actionBarSize" android:background = "?attr/colorPrimary" app:showSearchView = "false" app:leftButtonIcon = "@mipmap/ic_launcher" > </ com.zhanlu.share.MyToolbar > |
这是因为什么呢
16
收起
正在回答 回答被采纳积分+1
Android多媒体开发与应用2018版
- 参与学习 人
- 解答问题 241 个
本专题是动画、游戏、音视频等实际应用开发必备技能。课程深入到Android事件总线,利用主流框架实现消息推送、自定义事件统计分析等功能。最后带你开发一款利用传感器实现计步、距离、热量等功能的App。
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧