Skip to content

Commit

Permalink
添加属性tr_enable_loadmore,tr_pureScrollMode_on,tr_show_overlay_refreshview
Browse files Browse the repository at this point in the history
  • Loading branch information
lcodecore committed Oct 10, 2016
1 parent b3d2503 commit 186f218
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ public TwinklingRefreshLayout(Context context, AttributeSet attrs, int defStyleA
mHeadHeight = a.getDimensionPixelSize(R.styleable.TwinklingRefreshLayout_tr_head_height, (int) DensityUtil.dp2px(context, 80));
mBottomHeight = a.getDimensionPixelSize(R.styleable.TwinklingRefreshLayout_tr_bottom_height, (int) DensityUtil.dp2px(context, 60));
mOverScrollHeight = a.getDimensionPixelSize(R.styleable.TwinklingRefreshLayout_tr_overscroll_height,(int) DensityUtil.dp2px(context, 80));
enableLoadmore = a.getBoolean(R.styleable.TwinklingRefreshLayout_tr_enable_loadmore,true);
isPureScrollModeOn = a.getBoolean(R.styleable.TwinklingRefreshLayout_tr_pureScrollMode_on,false);
isOverlayRefreshShow = a.getBoolean(R.styleable.TwinklingRefreshLayout_tr_show_overlay_refreshview,true);
a.recycle();
}

Expand Down
3 changes: 3 additions & 0 deletions library/src/main/res/values/attrs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
<attr name="tr_head_height" format="dimension"/>
<attr name="tr_bottom_height" format="dimension"/>
<attr name="tr_overscroll_height" format="dimension"/>
<attr name="tr_enable_loadmore" format="boolean"/>
<attr name="tr_pureScrollMode_on" format="boolean"/>
<attr name="tr_show_overlay_refreshview" format="boolean"/>
<attr name="tr_headerView" format="dimension"/>
<attr name="tr_bottomView" format="dimension"/>
</declare-styleable>
Expand Down

0 comments on commit 186f218

Please sign in to comment.