android 滑动顶部固定,android view滑动到顶部悬停
千万不要再根据滑动的高度来控制控件的显示隐藏来实现悬停效果了,推荐一个超级方便的实现悬停效果的
CoordinatorLayout+AppBarLayout完美实现悬停效果
例子如下
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:elevation="0dp">
android:layout_width="match_parent"
android:orientation="vertical"
android:focusable="true"
android:focusableInTouchMode="true"
app:layout_scrollFlags="scroll"
android:layout_height="match_parent">
android:layout_width="match_parent"
android:textSize="@dimen/text_5"
android:background="@color/c_new8"
android:textColor="@color/white"
android:paddingLeft="@dimen/m_12"
android:text="滑动部分"
android:textStyle="bold"
android:layout_height="wrap_content" />
//悬停部分
android:layout_width="match_parent"
android:orientation="vertical"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:layout_height="match_parent">
android:layout_width="match_parent"
android:orientation="vertical"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:layout_height="match_parent">
android:id="@+id/ll_center"
android:layout_width="match_parent"
android:background="@color/color_white"
android:orientation="horizontal"
android:gravity="center_vertical"
android:layout_height="46dp">
android:id="@+id/magic_indicator3"
android:layout_centerVertical="true"
android:paddingLeft="@dimen/m_8"
android:paddingRight="@dimen/m_8"
android:layout_width="match_parent"
android:layout_toLeftOf="@+id/img_add"
android:layout_height="45dp"
/>
android:layout_width="match_parent"
android:layout_alignParentBottom="true"
android:background="@color/color_diver"
android:layout_height="1dp"/>
android:id="@+id/RecyclerView_others"
android:background="@color/color_white"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:id="@+id/RecyclerView_rate"
android:visibility="gone"
android:background="@color/color_white"
android:layout_width="match_parent"
android:layout_height="match_parent">
滑动部分最重要的是
悬停部分最主要的属性
android 滑动顶部固定,android view滑动到顶部悬停相关推荐
- android竖屏固定,ANDROID强制锁定竖屏_APP固定设置竖屏或横屏
1.XML锁定横屏或竖屏 在没有设置屏幕方向的情况下会默认设置为:android:screenOrientation="unspecified".即未指明屏幕方向.属性取值land ...
- android 横竖屏固定,Android——设置固定横竖屏
如果希望某个activity固定横竖屏,设置如下? 在AndroidManifest.xml设置: android:screenOrientation="portrait" 始终以 ...
- android view滑动到顶部并固定在顶部
创建自定义ScrollView /** * ProjectName: yuanxinclan_new * Author: lgq * Date: 2017/12/20 0020 10:07 */ pu ...
- Android自定义滑动进度条,Android自定义View实现圆形水波进度条
每次听到某大牛谈论自定义View,顿时敬佩之心,如滔滔江水连绵不绝,心想我什么时候能有如此境界,好了,心动不如行动,于是我开始了自定义View之路,虽然过程有坎坷,但是结果我还是挺满意的.我知道大牛还 ...
- android实现美团首页滑动菜单功能,Android模仿美团顶部的滑动菜单实例代码
前言 本文主要给大家介绍了关于android模仿美团顶部滑动菜单的相关内容,分享出来供大家参考学习,下面话不多说了,来一起看看详细的介绍吧. 先来看下效果图: 实现方法 这是通过 viewpager ...
- android标题栏渐变动画,Android 顶部标题栏随滑动时的渐变隐藏和渐变显示效果
各位早上好,话不多说,先上效果图: 注意顶部:首页textview的变化(显示和隐藏)! 首先分析下:ui状态,其是由recyclerview添加头部组成+recyclerview 头部添加和recy ...
- android 自定义ViewGroup和对view进行切图动画实现滑动菜单SlidingMenu[转]
http://blog.csdn.net/jj120522/article/details/8095852 示意图就不展示了,和上一节的一样,滑动菜单SlidingMenu效果如何大家都比较熟悉,在这 ...
- android view禁用,Android 禁止ViewPager的自带滑动效果
由于最近在做墨水屏的相关工作,ViewPager自带的滑动效果在墨水屏上表现的很不好,残影太重了.所以禁止自带的滑动效果,用接口来接管相关逻辑实现自处理. import android.content ...
- android 仿搜索动画,Android仿京东顶部搜索框滑动伸缩动画效果
最近使用京东发现,京东顶部的搜索框有一个新的伸缩效果,根据用户的手势滑动,伸缩搜索框.觉得效果还不错,就看了下其他的应用有没有这种伸缩的效果,发现安居客也使用了类似的一种效果,然后就想着实现这样的一种 ...
最新文章
- python自学时间-学习Python、Python时间操作有哪些?
- 下载合适的python-python下载文件的三种方法
- 如何用python和pip安装在txt文件中配置好版本的库包
- android listview 禁止滚动
- Ehcache(06)监听器
- python test suit_python unittest学习3---添加测试套件,testsuit
- excel趋势线公式导出_如何用Excel进行预测分析?
- HDU 1108 最小公倍数
- 用php上传mysql表文件_php实现上传文件并存储到mysql数据库
- 如何查看CentOS版本方法
- SQL之CASE WHEN用法详解
- HDOJ3594-仙人掌图的判断
- excel python插件_再见 VBA!神器工具统一 Excel 和 Python
- pycharm能不能编写Java_使用Pycharm编写第一个Python程序
- 足球一代又一代得青春
- qt中socket编程
- 用html画布做扇形,jquery canvas 画扇形
- BFC、IFC、GFC、FFC概念理解、布局规则、形成方法、用处浅析
- GEE:提取多个点的时间序列数据,保存为csv格式(以NDVI为例)
- 计算机组成原理TEC-8,南信大 计算机组成原理实验TEC-8实验指导书.pdf