CNiaoShop---第一天

来源:互联网 发布:雅思口语网课推荐知乎 编辑:程序博客网 时间:2024/06/16 10:44

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

                 看了第一节视频,项目对底部导航栏采用了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颜色显示正常。

0 0
原创粉丝点击