Android控件SlidingUpPanel与ListView

在使用SlidingUpPanel过程中借鉴了很多其他人的写的博客内容,SlidingUpPanel的一些属性特征其他人的博客写的也十分清晰,这里记录我用AndroidSlidingUpPanel遇到的一些问题。附上借鉴他人的链接http://www.jcodecraeer.com/a/anzhuokaifa/androidkaifa/2014/1016/1781.html在一个开发需求中,...
摘要由CSDN通过智能技术生成

#介绍
在使用SlidingUpPanel过程中借鉴了很多其他人的写的博客内容,SlidingUpPanel的一些属性特征其他人的博客写的也十分清晰,这里记录我用AndroidSlidingUpPanel遇到的一些问题。
附上借鉴他人的链接
http://www.jcodecraeer.com/a/anzhuokaifa/androidkaifa/2014/1016/1781.html

###功能
在一个开发需求中,需要设计一个下图这样的一个需求,
如图所示,顶部浅蓝色是一个title,底部深蓝色的部分是一个listview,白色底红色部分是一个上拉框,希望只有通过滑动或点击白色部分才能展开和缩放,在蓝色部分滑动只是滑动listview。展开图片如下图所示
在这里插入图片描述

<RelativeLayout 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="com.exam
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
AndroidSlidingUpPanel 是一个上拉面板, 就是向上滑动的时候往上飞出一个显示面板控件, 该库效果在 Google Music, Google Maps and Rdio等 App 中用到。 效果图: 用法:使用com.sothree.slidinguppanel.SlidingUpPanelLayout作为您的活动布局的根元素。 布局必须设置为顶部或底部。请确保它有两个元素。 第一个元素是你的主要布局。第二个元素是你的向上滑动面板布局。 主要布局应当具有的宽度和高度设置为match_parent。 滑动的布局的宽度应设置为match_parent;高度应设置为match_parent,WRAP_CONTENT或最大desireable高度。 如果您想定义高度屏幕为percetange,可将其设置为match_parent,滑动视图定义为layout_weight属性。  默认情况下,整个面板将作为拖动区域和将截获的点击和拖动事件。可以通过使用setDragView方法或umanoDragView属性限制牵引区到特定的图。 想了解更多信息,请参考示例代码:<com.sothree.slidinguppanel.SlidingUpPanelLayout     xmlns:sothree="http://schemas.android.com/apk/res-auto"     android:id="@ id/sliding_layout"     android:layout_width="match_parent"     android:layout_height="match_parent"     android:gravity="bottom"     sothree:umanoPanelHeight="68dp"     sothree:umanoShadowHeight="4dp">     <TextView         android:layout_width="match_parent"         android:layout_height="match_parent"         android:gravity="center"         android:text="Main Content"         android:textSize="16sp" />     <TextView         android:layout_width="match_parent"         android:layout_height="match_parent"         android:gravity="center|top"         android:text="The Awesome Sliding Up Panel"         android:textSize="16sp" /> </com.sothree.slidinguppanel.SlidingUpPanelLayout>

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值