本文整理汇总了Java中in.srain.cube.views.ptr.PtrFrameLayout类的典型用法代码示例。如果您正苦于以下问题:Java PtrFrameLayout类的具体用法?Java PtrFrameLayout怎么用?Java PtrFrameLayout使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PtrFrameLayout类属于in.srain.cube.views.ptr包,在下文中一共展示了PtrFrameLayout类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onUIPositionChange
import in.srain.cube.views.ptr.PtrFrameLayout; //导入依赖的package包/类
@Override
public void onUIPositionChange(PtrFrameLayout frame, boolean isUnderTouch, byte status, PtrIndicator ptrIndicator) {
float percent = Math.min(1f, ptrIndicator.getCurrentPercent());
if (status == PtrFrameLayout.PTR_STATUS_PREPARE) {
mDrawable.setAlpha((int) (255 * percent));
mDrawable.showArrow(true);
float strokeStart = ((percent) * .8f);
mDrawable.setStartEndTrim(0f, Math.min(0.8f, strokeStart));
mDrawable.setArrowScale(Math.min(1f, percent));
// magic
float rotation = (-0.25f + .4f * percent + percent * 2) * .5f;
mDrawable.setProgressRotation(rotation);
invalidate();
}
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:20,代码来源:MaterialHeader.java
示例2: getBaseInfo
import in.srain.cube.views.ptr.PtrFrameLayout; //导入依赖的package包/类
public void getBaseInfo(PtrFrameLayout ptrFrame) {
if (!NetworkUtils.isNetworkAvaliable(getActivity())) {
ToastUtil.showToast(getActivity(), R.string.net_error);
//TODO
List<Rows> devices = (List<Rows>) SharedPreferencesUtils.getObject(getActivity(), SharedPreferencesUtils.KEY_DEVICE_LIST, null);
if (null != devices && devices.size() > 0) {
deviceList.clear();
deviceList.addAll(devices);
}
if (devicesListAdapter != null) {
//更新数据
Log.d("XLight", "update device list");
codeChange = true;
devicesListAdapter.notifyDataSetChanged();
codeChange = false;
}
addDeviceMapsSDK(deviceList);
return;
}
// if (!UserUtils.isLogin(getActivity())) {
// return;
// }
refreshDeviceInfo(ptrFrame);
}
开发者ID:Datatellit,项目名称:xlight_android_native,代码行数:25,代码来源:GlanceMainFragment.java
示例3: setCustomSwipeToRefresh
import in.srain.cube.views.ptr.PtrFrameLayout; //导入依赖的package包/类
public void setCustomSwipeToRefresh() {
mPtrFrameLayout = (PtrFrameLayout) findViewById(R.id.store_house_ptr_frame);
mPtrFrameLayout.setResistance(1.7f);
mPtrFrameLayout.setRatioOfHeaderHeightToRefresh(1.2f);
mPtrFrameLayout.setDurationToClose(200);
mPtrFrameLayout.setDurationToCloseHeader(1000);
mPtrFrameLayout.setPullToRefresh(false);
mPtrFrameLayout.setKeepHeaderWhenRefresh(true);
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:10,代码来源:CustomUltimateRecyclerview.java
示例4: onCreate
import in.srain.cube.views.ptr.PtrFrameLayout; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
instance = this;
String environment = "";
if (environment.equals("production")) {
CLog.setLogLevel(CLog.LEVEL_ERROR);
} else if (environment.equals("beta")) {
CLog.setLogLevel(CLog.LEVEL_WARNING);
} else {
// development
CLog.setLogLevel(CLog.LEVEL_VERBOSE);
}
CubeDebug.DEBUG_IMAGE = true;
PtrFrameLayout.DEBUG = true;
PtrFrameLayout.DEBUG = false;
ImageLoaderFactory.setDefaultImageReSizer(DemoDuiTangImageReSizer.getInstance());
ImageLoaderFactory.setDefaultImageLoadHandler(new PtrImageLoadHandler());
String dir = "request-cache";
// ImageLoaderFactory.init(this);
RequestCacheManager.init(this, dir, 1024 * 10, 1024 * 10);
Cube.onCreate(this);
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:28,代码来源:PtrDemoApplication.java
示例5: onUIRefreshBegin
import in.srain.cube.views.ptr.PtrFrameLayout; //导入依赖的package包/类
@Override
public void onUIRefreshBegin(PtrFrameLayout frame) {
mDrawable.start();
float percent = mPtrTensionIndicator.getOverDragPercent();
mDrawable.offsetTopAndBottom(mPtrTensionIndicator.getCurrentPosY());
mDrawable.setPercent(percent);
invalidate();
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:9,代码来源:RentalsSunHeaderView.java
示例6: onUIPositionChange
import in.srain.cube.views.ptr.PtrFrameLayout; //导入依赖的package包/类
@Override
public void onUIPositionChange(PtrFrameLayout frame, boolean isUnderTouch, byte status, PtrIndicator ptrIndicator) {
float percent = mPtrTensionIndicator.getOverDragPercent();
mDrawable.offsetTopAndBottom(mPtrTensionIndicator.getCurrentPosY());
mDrawable.setPercent(percent);
invalidate();
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:8,代码来源:RentalsSunHeaderView.java
示例7: initViews
import in.srain.cube.views.ptr.PtrFrameLayout; //导入依赖的package包/类
@Override
protected void initViews(View contentView) {
filesListView = (ListView) rootView.findViewById(R.id.filesListview);
mAdapter = new FileListAdapter(getActivity());
filesListView.setAdapter(mAdapter);
refreshLayout = (PtrFrameLayout) rootView.findViewById(R.id.refreshLayout);
// 这句话是为了,第一次进入页面的时候显示加载进度条
refreshLayout.autoRefresh(true,1000);
}
开发者ID:tryBetter,项目名称:minVideo,代码行数:13,代码来源:FileListFragment.java
示例8: onUIReset
import in.srain.cube.views.ptr.PtrFrameLayout; //导入依赖的package包/类
@Override
public void onUIReset(PtrFrameLayout frame) {
loadFinish();
for (int i = 0; i < mItemList.size(); i++) {
mItemList.get(i).resetPosition(mHorizontalRandomness);
}
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:9,代码来源:StoreHouseHeader.java
示例9: onUIPositionChange
import in.srain.cube.views.ptr.PtrFrameLayout; //导入依赖的package包/类
@Override
public void onUIPositionChange(PtrFrameLayout frame, boolean isUnderTouch, byte status, PtrIndicator ptrIndicator) {
float currentPercent = Math.min(1f, ptrIndicator.getCurrentPercent());
setProgress(currentPercent);
invalidate();
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:8,代码来源:StoreHouseHeader.java
示例10: onUIRefreshComplete
import in.srain.cube.views.ptr.PtrFrameLayout; //导入依赖的package包/类
@Override
public void onUIRefreshComplete(PtrFrameLayout frame) {
float percent = mPtrTensionIndicator.getOverDragPercent();
mDrawable.stop();
mDrawable.offsetTopAndBottom(mPtrTensionIndicator.getCurrentPosY());
mDrawable.setPercent(percent);
invalidate();
}
开发者ID:qianxinyi,项目名称:DripUltraRefreshWithLoad,代码行数:9,代码来源:RentalsSunHeaderView.java
示例11: create
import in.srain.cube.views.ptr.PtrFrameLayout; //导入依赖的package包/类
public static BuilderStep1 create(PtrFrameLayout ptrFrameLayout) {
IPullView pullView = PtrFramePullView.create(ptrFrameLayout);
IListWrapper listWrapper = null;
if ((listWrapper = createListWrapper(ptrFrameLayout.getContentView())) == null) {
throw new IllegalArgumentException("can not find recyclerview or listview in ptrFrameLayout");
}
return new BuilderStep1(pullView, listWrapper);
}
开发者ID:liyuanhust,项目名称:LoadMoreHelper,代码行数:9,代码来源:LoadMoreHelper.java
示例12: onUIReset
import in.srain.cube.views.ptr.PtrFrameLayout; //导入依赖的package包/类
public void onUIReset(PtrFrameLayout frame) {
loadFinish();
for (int i = 0; i < mItemList.size(); i++) {
mItemList.get(i).resetPosition(mHorizontalRandomness);
}
}
开发者ID:qianxinyi,项目名称:DripUltraRefreshWithLoad,代码行数:8,代码来源:StoreHouseFooter.java
示例13: setUp
import in.srain.cube.views.ptr.PtrFrameLayout; //导入依赖的package包/类
public void setUp(PtrFrameLayout ptrFrameLayout) {
mPtrFrameLayout = ptrFrameLayout;
mPtrTensionIndicator = new PtrTensionIndicator();
mPtrFrameLayout.setPtrIndicator(mPtrTensionIndicator);
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:6,代码来源:RentalsSunHeaderView.java
示例14: onUIReset
import in.srain.cube.views.ptr.PtrFrameLayout; //导入依赖的package包/类
@Override
public void onUIReset(PtrFrameLayout frame) {
mDrawable.resetOriginals();
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:5,代码来源:RentalsSunHeaderView.java
示例15: onUIReset
import in.srain.cube.views.ptr.PtrFrameLayout; //导入依赖的package包/类
/**
* When the content view has reached top and refresh has been completed, view will be reset.
*
* @param frame
*/
@Override
public void onUIReset(PtrFrameLayout frame) {
mScale = 1f;
mDrawable.stop();
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:11,代码来源:MaterialHeader.java
示例16: onUIRefreshBegin
import in.srain.cube.views.ptr.PtrFrameLayout; //导入依赖的package包/类
/**
* perform refreshing UI
*
* @param frame
*/
@Override
public void onUIRefreshBegin(PtrFrameLayout frame) {
mDrawable.setAlpha(255);
mDrawable.start();
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:11,代码来源:MaterialHeader.java
示例17: onUIRefreshBegin
import in.srain.cube.views.ptr.PtrFrameLayout; //导入依赖的package包/类
@Override
public void onUIRefreshBegin(PtrFrameLayout frame) {
beginLoading();
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:5,代码来源:StoreHouseHeader.java
注:本文中的in.srain.cube.views.ptr.PtrFrameLayout类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论