资源简介
DayMatterByGenng
倒数日安卓项目
代码片段和文件信息
package cn.jian.daymatter.view;
import android.content.Context;
import android.graphics.Rect;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.VelocityTracker;
import android.view.View;
import android.view.ViewConfiguration;
import android.view.ViewGroup;
import android.widget.Scroller;
public class LeftSliderLayout extends ViewGroup {
private Scroller mScroller;
private VelocityTracker mVelocityTracker;
/**
* Constant value for touch state
* TOUCH_STATE_REST : no touch
* TOUCH_STATE_SCROLLING : scrolling
*/
private static final int TOUCH_STATE_REST = 0;
private static final int TOUCH_STATE_SCROLLING = 1;
private int mTouchState = TOUCH_STATE_REST;
/**
* Distance in pixels a touch can wander before we think the user is scrolling
*/
private int mTouchSlop;
/**
* Values for saving axis of the last touch event.
*/
private float mLastMotionX;
private float mLastMotionY;
/**
* Values for VelocityTracker to compute current velocity.
* VELOCITY_UNITS in dp
* mVelocityUnits in px
*/
private static final int VELOCITY_UNITS = 1000;
private int mVelocityUnits;
/**
* The minimum velocity for determining the direction.
* MINOR_VELOCITY in dp
* mMinorVelocity in px
*/
private static final float MINOR_VELOCITY = 150.0f;
private int mMinorVelocity;
/**
* The width of Sliding distance from left.
* And it should be the same with the width of the View below SliderLayout in a frameLayout.
* DOCK_WIDTH in dp
* mDockWidth in px
*/
private static final float SLIDING_WIDTH = 240.0f;
private int mSlidingWidth;
/**
* The default values of shadow.
* VELOCITY_UNITS in dp
* mVelocityUnits in px
*/
private static final float DEF_SHADOW_WIDTH = 10.0f;
private int mDefShadowWidth;
/**
* Value for checking a touch event is completed.
*/
private boolean mIsTouchEventDone = false;
/**
* Value for checking slider is open.
*/
private boolean mIsOpen = false;
/**
* Value for saving the last offset of scroller ’ x-axis.
*/
private int mSaveScrollX = 0;
/**
* Value for checking slider is allowed to slide.
*/
private boolean mEnableSlide = true;
private View mMainChild = null;
private OnLeftSliderLayoutStateListener mListener = null;
/**
* Instantiates a new LeftSliderLayout.
*
* @param context the associated Context
* @param attrs AttributeSet
*/
public LeftSliderLayout(Context context AttributeSet attrs) {
this(context attrs 0);
}
/**
* Instantiates a new LeftSliderLayout.
*
* @param context the associated Context
* @param attrs AttributeSet
* @param defstyle style
*/
public LeftSliderLayout(Context con
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2014-08-12 01:50 DayMatterByGenng-master\
文件 231 2014-08-12 01:50 DayMatterByGenng-master\.gitignore
文件 13247 2014-08-12 01:50 DayMatterByGenng-master\LeftSliderLayout.java
文件 1397 2014-08-12 01:50 DayMatterByGenng-master\LeftSliderLayout说明.txt
文件 57 2014-08-12 01:50 DayMatterByGenng-master\README.md
- 上一篇:Java画图程序源码.rar
- 下一篇:Android代码-安卓记事本app
相关资源
- Android代码-多功能拨号盘源码.zip
- Android代码-安卓美颜相机
- Android代码-查询软件源代码身份证号号
- Android代码-旅游app的安卓端
- Android代码-英语单词记忆程序源码(
- Android代码-滴答词典源码.zip
- Android代码-本项目是基于XMPP的物联网
- Android代码-Android-ConvenientBanner
- Android代码-安卓手机时钟
- Android代码-仓库管理系统源码.zip
- Android代码-一款安卓答题软件
- Android代码-Sokoban.zip
- Android代码-韵音乐播放器
- Android代码-DouBan_Movie
- Android代码-在wifi下手机与电脑的sock
- Android代码-[安卓开源]校园商品交易系
- Android代码-Android上简洁轻量级的饼图
- Android代码-软件冰箱(安卓版)
- Android代码-国产音乐播放器项目听听音
- Android代码-[安卓开源]ImiFirewall.zip
- 本地音乐播放-Android代码
- BMI小程序android代码
- Android代码-支持全屏、小窗口的视频播
- Android代码-智能家居系统(安卓端)
- Android代码-小米文件管理器源码.zip
- Android代码-健康饮食搭配源码.zip
- Android代码-[安卓开源]空气质量检测客
- Android代码-SlideBar
- Android代码-数独游戏
- Android代码-记账本源码.zip
评论
共有 条评论