Skip to content

Commit

Permalink
增加了些注释
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoqp2010 committed Nov 27, 2013
1 parent cdb254a commit da8a96c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 22 deletions.
Binary file modified AndBase/bin/andbase.jar
Binary file not shown.
Binary file modified AndBase/bin/classes/com/ab/view/pullview/AbPullView.class
Binary file not shown.
2 changes: 1 addition & 1 deletion AndBase/src/com/ab/view/pullview/AbPullGridView.java
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ public void onClick(View v) {
}

/**
* stop refresh, reset header view.
* 停止刷新并重置header的状态.
*/
public void stopRefresh() {
if (mPullRefreshing == true) {
Expand Down
34 changes: 13 additions & 21 deletions AndBase/src/com/ab/view/pullview/AbPullView.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,32 +74,31 @@ public class AbPullView extends ScrollView{


/**
* Instantiates a new ab pull view.
* 构造.
*
* @param context the context
*/
public AbPullView(Context context) {
super(context);
initWithContext(context);
initView(context);
}

/**
* Instantiates a new ab pull view.
* 构造.
*
* @param context the context
* @param attrs the attrs
*/
public AbPullView(Context context, AttributeSet attrs) {
super(context, attrs);
initWithContext(context);
initView(context);
}

/**
* Inits the with context.
*
* 初始化View.
* @param context the context
*/
private void initWithContext(Context context) {
private void initView(Context context) {
mScroller = new Scroller(context, new DecelerateInterpolator());

LinearLayout.LayoutParams layoutParamsFW = new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT);
Expand All @@ -118,9 +117,9 @@ private void initWithContext(Context context) {
}

/**
* enable or disable pull down refresh feature.
* 打开或者关闭下拉刷新功能.
*
* @param enable the new pull refresh enable
* @param enable 开关标记
*/
public void setPullRefreshEnable(boolean enable) {
mEnablePullRefresh = enable;
Expand All @@ -132,7 +131,7 @@ public void setPullRefreshEnable(boolean enable) {
}

/**
* stop refresh, reset header view.
* 停止刷新并重置header的状态.
*/
public void stopRefresh() {
if (mPullRefreshing == true) {
Expand All @@ -142,8 +141,9 @@ public void stopRefresh() {
}

/**
* Update header height.
* @param delta the delta
* 更新header的高度.
*
* @param delta 差的距离
*/
private void updateHeaderHeight(float delta) {
int newHeight = (int) delta + mHeaderView.getVisiableHeight();
Expand Down Expand Up @@ -178,10 +178,6 @@ private void resetHeaderHeight() {

/**
* 描述:TODO
* @see android.widget.ScrollView#onTouchEvent(android.view.MotionEvent)
* @author: zhaoqp
* @date:2013-9-4 下午4:06:32
* @version v1.0
*/
@Override
public boolean onTouchEvent(MotionEvent ev) {
Expand Down Expand Up @@ -224,10 +220,6 @@ public boolean onTouchEvent(MotionEvent ev) {

/**
* 描述:TODO
* @see android.widget.ScrollView#computeScroll()
* @author: zhaoqp
* @date:2013-9-4 下午4:06:32
* @version v1.0
*/
@Override
public void computeScroll() {
Expand All @@ -243,7 +235,7 @@ public void computeScroll() {
/**
* 描述:设置ListView的监听器.
*
* @param abOnRefreshListener the new ab on refresh listener
* @param abOnRefreshListener
*/
public void setAbOnRefreshListener(AbOnRefreshListener abOnRefreshListener) {
mAbOnRefreshListener = abOnRefreshListener;
Expand Down

0 comments on commit da8a96c

Please sign in to comment.