-
Notifications
You must be signed in to change notification settings - Fork 4
IFooterView_en
Zone edited this page Jan 18, 2017
·
1 revision
public interface IFooterView {
/**
* change header Global Configuration
* Main object is to copy the head, copy to copy the properties
* Note: returns null, the default is the LoadFooter
*/
IFooterView clone_();
/**
* Get footer layout
* @param zRefreshLayout
* @return
*/
View getView(ZRefreshLayout zRefreshLayout);
/**
* loadMoreIng
* @param footerHeight
*/
void onStart(float footerHeight);
/**
* loadMore is complete
*/
void onComplete();
}
public class MeterialFooter implements IFooterView {
private MeterialCircle mMeterialCircle;
private View rootView;
@Override
public View getView(ZRefreshLayout zRefreshLayout) {
rootView = View.inflate(zRefreshLayout.getContext(), R.layout.header_meterial, null);
LinearLayout ll_main = (LinearLayout) rootView.findViewById(R.id.ll_main);
int[] screenPixs = ScreenUtils.getScreenPix((Activity) zRefreshLayout.getContext());
ll_main.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT
, (int) (screenPixs[1] * 0.1)));
mMeterialCircle=new MeterialCircle(ll_main,(int) (screenPixs[1] * 0.08));
rootView.setVisibility(View.INVISIBLE);
return rootView;
}
@Override
public void onStart(float footerHeight) {
rootView.setVisibility(View.VISIBLE);
mMeterialCircle.start();
}
@Override
public void onComplete() {
rootView.setVisibility(View.INVISIBLE);
mMeterialCircle.stop();
}
@Override
public IFooterView clone_() {
MeterialFooter clone =new MeterialFooter();
return clone;
}
}