The AULoadingView component provides a loading page that displays a progress indicator, loading status, and descriptive text.
Previews


API reference
AULoadingView
/**
* Constructor
* @param context The page context that contains the antu dependency.
*/
public AULoadingView(Context context)
/**
* Sets the progress.
* @param curentProgress The progress.
*/
public void setCurrentProgress(int curentProgress)AUPullLoadingView
/**
* Constructor
* @param context The page context that contains the antu dependency.
*/
public AUPullLoadingView(Context context)
/**
* Sets the progress pattern.
* @param drawable
*/
public void setProgressDrawable(Drawable drawable)
/**
* Sets the rebound pattern.
* @param mIndicatorUpDrawable
*/
public void setIndicatorUpDrawable
/**
* Sets the loading text.
* @param loadingText
*/
public void setLoadingText(String loadingText)
/**
* Sets the drag text.
* @param indicatorText
*/
public void setIndicatorText(String indicatorText)AUDragLoadingView
/**
* Constructor
* @param context The page context that contains the antu dependency.
*/
public AUDragLoadingView(Context context)
/**
* Sets the loading text.
* @param text
*/
public void setLoadingText(CharSequence text)Code examples
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("Modified text...");
}
});