AULoadingView provides loading pages containing the progress pattern, loading progress, and loading text.
Dependency
See Quick start.
API description
AULoadingView
/**
* The constructor.
* @param context The page context including the antu dependency.
*/
public AULoadingView(Context context)
/**
* Set the progress.
* @param curentProgress The progress.
*/
public void setCurrentProgress(int curentProgress)
AUPullLoadingView
/**
* The constructor.
* @param context The page context including the antu dependency.
*/
public AUPullLoadingView(Context context)
/**
* Set the progress pattern.
* @param drawable
*/
public void setProgressDrawable(Drawable drawable)
/**
* Set the bounce pattern.
* @param mIndicatorUpDrawable
*/
public void setIndicatorUpDrawable
/**
* Set the loading text.
* @param loadingText
*/
public void setLoadingText(String loadingText)
/**
* Set the dragging text.
* @param indicatorText
*/
public void setIndicatorText(String indicatorText)
AUDragLoadingView
/**
* The constructor.
* @param context The page context including the antu dependency.
*/
public AUDragLoadingView(Context context)
/**
* Set the loading text.
* @param text
*/
public void setLoadingText(CharSequence text)
Code sample
AULoadingView
private AULoadingView mAULoadingView mAULoadingView = (AULoadingView) findViewById(R.id.loadingView);
private Handler mHandler = new Handler() {
@Override
public void handleMessage(Message msg) {
super.handleMessage(msg);
mAULoadingView.setCurrentProgress(mCurrentProgress);
}
};
protected void onResume() {
super.onResume();
new Thread(new Runnable() {
@Override
public void run() {
while (mCurrentProgress < 100) {
try {
Thread.currentThread().sleep(500);
mCurrentProgress++;
mHandler.sendEmptyMessage(0);
} catch (Exception e) { Log.e("EmptyPageLoadingActivity",e.getMessage());
}
}
}
}).start();
}
AUPullLoadingView
@Override
public AUPullLoadingView getOverView() {
mAUPullLoadingView2 = (AUPullLoadingView) LayoutInflater.from(getBaseContext())
.inflate(R.layout.au_framework_pullrefresh_overview, null);
return mAUPullLoadingView2;
}
AUDragLoadingView
mAUDragLoadingView = (AUDragLoadingView) findViewById(R.id.dragLoadingView);
findViewById(R.id.modifyLoadingText).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mAUDragLoadingView.setLoadingText("Text after modification...") ;
}
});