说明:DrawerLayout的作用就是左侧滑出、右侧滑出菜单。需要和ActionBarDrawerToggle来配合使用。如果对ActionBar不理解,请先熟悉ActionBar。 1、首先配置DrawerLayout。 说明:此时配置完毕,就可以滑动屏幕左侧和右侧,此时已经可以滑出菜单了。 2 ...
分类:
其他好文 时间:
2016-11-21 18:40:29
阅读次数:
141
ActionBar(V7)的添加非常简单,只需要在AndroidManifest.xml中指定Application或Activity的theme是Theme.Holo或其子类就可以了,在Android 3.0及更高的版本中,Activity中都默认包含有ActionBar组件。 drawerLay ...
分类:
移动开发 时间:
2016-11-18 22:54:33
阅读次数:
286
整个项目的框架在ContentPager,要熟悉这个类。
简介完成侧拉栏的显示,侧拉首页对应的:首页+应用+游戏这3个 tab,包含的知识点有:请求数据 +pullTofresh + ImageLoa...
分类:
移动开发 时间:
2016-10-29 22:27:29
阅读次数:
659
FloatingActionButton 悬浮按钮:FloatingActionButton是重写ImageView的,所有FloatingActionButton拥有ImageView的一切属性。 app:backgroundTint - 设置FAB的背景颜色。 app:rippleColor - ...
分类:
移动开发 时间:
2016-10-07 01:05:18
阅读次数:
443
0.学习目的: 1.解决开发中点击冲突,滑动冲突 drawerLayout点击穿透 viewpager嵌套viewpager左右滑动的时候冲突 2.深入了解Android事件机制 1.事件 1.事件包括:点击,双击,长按,滑动,拖拽,多点触控,组成了Android的事件 2.事件动作组成: 1.AC ...
分类:
其他好文 时间:
2016-09-30 21:33:40
阅读次数:
222
最近在学习drawerLayout时,遇到这个bug。如下示: java.lang.ClassCastException: android.widget.RelativeLayout cannot be cast to android.widget.TextView 原因: 可能是没有在适配器参数内 ...
分类:
移动开发 时间:
2016-09-05 16:42:57
阅读次数:
669
效果 1.,导包design包和appcompat-v7 ,设置Theme主题Style为NoActionbar 2.custom_toolbar.xml 3.custom_drawerlayout.xml 4.activity_main.xml 5.MainActivity ...
分类:
其他好文 时间:
2016-08-30 13:27:54
阅读次数:
211
第一感觉是下层仍有焦点,解决办法应该是侧方页面出现后,下层页面的焦点改为false,应该是动态去改变焦点的状态,但是不知道如何去实现。 然后再网上找到实现方法,感谢:http://blog.csdn.net/qiang_xi/article/details/49329679 DrawerLayout ...
分类:
其他好文 时间:
2016-08-15 22:20:41
阅读次数:
133
Android——ListView与适配器
1.抽屉布局 Drawer
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas...
分类:
移动开发 时间:
2016-08-03 22:18:56
阅读次数:
220
本文对Material Design Library里面的库类的使用做一个简单的汇总,方便以后能快速查询、快速上手使用。本文包括以下内容:
Color Palette
Toolbar
AppBarLayout
CollapsingToolbarLayout
CoordinatorLayout
DrawerLayout、N...
分类:
其他好文 时间:
2016-07-25 11:50:35
阅读次数:
171