首页 > 学院 > 开发设计 > 正文

CNiaoShop---第一天

2019-11-06 09:50:07
字体:
来源:转载
供稿:网友

    终于等到菜鸟商城的项目课程的到来。

                 看了第一节视频,项目对底部导航栏采用了FragmentTabHost去搭建,五个主页面采用FrameLayout+Fragment去填充,在观看学习的同时,不得不佩服老师代码封装的厉害。

                在自定义Toolbar的时候。actionBar和Toolbar的一些冲突不能采用

requestWindowFeature(Window.FEATURE_NO_TITLE);的方式来隐藏ActionBar,同时也不能在
android:theme="@style/APPTheme" >设置主题风格会导致冲突,so,查阅了许多资料,最终。
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar" >    <!-- Customize your theme here. -->    <item name="colorPRimary">@color/colorPrimary</item>    <item name="colorPrimaryDark">@color/colorPrimaryDark</item>    <!-- V4包环境引用的 -->    <item name="android:windowActionBar">false</item>    <item name="android:windowNoTitle">true</item>    <!-- V7包环境引用的 -->    <item name="windowActionBar">false</item>    <item name="windowNoTitle">true</item></style>成功的隐藏了actionBar并且让toolBar颜色显示正常。


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表