use of com.etiennelawlor.quickreturn.library.listeners.QuickReturnListViewOnScrollListener in project QuickReturn by lawloretienne.
the class QuickReturnFooterListViewFragment method onViewCreated.
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
mValues = getResources().getStringArray(R.array.countries);
ArrayAdapter<String> adapter = new ArrayAdapter<>(getActivity(), R.layout.list_item, R.id.item_tv, mValues);
mListView.setAdapter(adapter);
int footerHeight = getActivity().getResources().getDimensionPixelSize(R.dimen.footer_height);
QuickReturnListViewOnScrollListener scrollListener;
SpeedyQuickReturnListViewOnScrollListener scrollListener2;
switch(mQuickReturnAnimationType) {
case TRANSLATION_SIMPLE:
scrollListener = new QuickReturnListViewOnScrollListener.Builder(QuickReturnViewType.FOOTER).footer(mQuickReturnTextView).minFooterTranslation(footerHeight).build();
mListView.setOnScrollListener(scrollListener);
break;
case TRANSLATION_SNAP:
scrollListener = new QuickReturnListViewOnScrollListener.Builder(QuickReturnViewType.FOOTER).footer(mQuickReturnTextView).minFooterTranslation(footerHeight).isSnappable(true).build();
mListView.setOnScrollListener(scrollListener);
break;
case TRANSLATION_ANTICIPATE_OVERSHOOT:
scrollListener2 = new SpeedyQuickReturnListViewOnScrollListener.Builder(getActivity(), QuickReturnViewType.FOOTER).footer(mQuickReturnTextView).build();
mListView.setOnScrollListener(scrollListener2);
break;
default:
scrollListener = new QuickReturnListViewOnScrollListener.Builder(QuickReturnViewType.FOOTER).footer(mQuickReturnTextView).minFooterTranslation(footerHeight).build();
mListView.setOnScrollListener(scrollListener);
break;
}
}
use of com.etiennelawlor.quickreturn.library.listeners.QuickReturnListViewOnScrollListener in project superCleanMaster by joyoyao.
the class BatterySavingActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_battery_saving);
getActionBar().setDisplayHomeAsUpEnabled(true);
// applyKitKatTranslucency();
mBatterySavingAdapter = new BatterySavingAdapter(mContext, mAppProcessInfos);
mListView.setAdapter(mBatterySavingAdapter);
bindService(new Intent(mContext, CoreService.class), mServiceConnection, Context.BIND_AUTO_CREATE);
int footerHeight = mContext.getResources().getDimensionPixelSize(R.dimen.footer_height);
mListView.setOnScrollListener(new QuickReturnListViewOnScrollListener(QuickReturnType.FOOTER, null, 0, bottom_lin, footerHeight));
textCounter.setAutoFormat(false);
textCounter.setFormatter(new DecimalFormatter());
textCounter.setAutoStart(false);
// the amount the number increments at each time interval
textCounter.setIncrement(5f);
// the time interval (ms) at which the text changes
textCounter.setTimeInterval(50);
mInterstitialAd = new InterstitialAd(this);
mInterstitialAd.setAdUnitId("ca-app-pub-4369038195513432/2986510514");
mInterstitialAd.loadAd(new AdRequest.Builder().build());
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
}
use of com.etiennelawlor.quickreturn.library.listeners.QuickReturnListViewOnScrollListener in project superCleanMaster by joyoyao.
the class MemoryCleanActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_memory_clean);
getActionBar().setDisplayHomeAsUpEnabled(true);
// applyKitKatTranslucency();
mClearMemoryAdapter = new ClearMemoryAdapter(mContext, mAppProcessInfos);
mListView.setAdapter(mClearMemoryAdapter);
bindService(new Intent(mContext, CoreService.class), mServiceConnection, Context.BIND_AUTO_CREATE);
int footerHeight = mContext.getResources().getDimensionPixelSize(R.dimen.footer_height);
mListView.setOnScrollListener(new QuickReturnListViewOnScrollListener(QuickReturnType.FOOTER, null, 0, bottom_lin, footerHeight));
textCounter.setAutoFormat(false);
textCounter.setFormatter(new DecimalFormatter());
textCounter.setAutoStart(false);
// the amount the number increments at each time interval
textCounter.setIncrement(5f);
// the time interval (ms) at which the text changes
textCounter.setTimeInterval(50);
mInterstitialAd = new InterstitialAd(this);
mInterstitialAd.setAdUnitId("ca-app-pub-4369038195513432/2986510514");
mInterstitialAd.loadAd(new AdRequest.Builder().build());
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
}
use of com.etiennelawlor.quickreturn.library.listeners.QuickReturnListViewOnScrollListener in project superCleanMaster by joyoyao.
the class MemoryCleanActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_memory_clean);
getActionBar().setDisplayHomeAsUpEnabled(true);
// applyKitKatTranslucency();
mClearMemoryAdapter = new ClearMemoryAdapter(mContext, mAppProcessInfos);
mListView.setAdapter(mClearMemoryAdapter);
bindService(new Intent(mContext, CoreService.class), mServiceConnection, Context.BIND_AUTO_CREATE);
int footerHeight = mContext.getResources().getDimensionPixelSize(R.dimen.footer_height);
mListView.setOnScrollListener(new QuickReturnListViewOnScrollListener(QuickReturnType.FOOTER, null, 0, bottom_lin, footerHeight));
textCounter.setAutoFormat(false);
textCounter.setFormatter(new DecimalFormatter());
textCounter.setAutoStart(false);
// the amount the number increments at each time interval
textCounter.setIncrement(5f);
// the time interval (ms) at which the text changes
textCounter.setTimeInterval(50);
}
use of com.etiennelawlor.quickreturn.library.listeners.QuickReturnListViewOnScrollListener in project superCleanMaster by joyoyao.
the class RubbishCleanActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_rublish_clean);
getActionBar().setDisplayHomeAsUpEnabled(true);
// applyKitKatTranslucency();
// StikkyHeaderBuilder.stickTo(mListView).setHeader(header)
// .minHeightHeaderPixel(0).build();
res = getResources();
int footerHeight = mContext.getResources().getDimensionPixelSize(R.dimen.footer_height);
mListView.setEmptyView(mEmptyView);
rublishMemoryAdapter = new RublishMemoryAdapter(mContext, mCacheListItem);
mListView.setAdapter(rublishMemoryAdapter);
mListView.setOnItemClickListener(rublishMemoryAdapter);
mListView.setOnScrollListener(new QuickReturnListViewOnScrollListener(QuickReturnType.FOOTER, null, 0, bottom_lin, footerHeight));
bindService(new Intent(mContext, CleanerService.class), mServiceConnection, Context.BIND_AUTO_CREATE);
}
Aggregations