Search in sources :

Example 1 with ClearMemoryAdapter

use of com.yzy.supercleanmaster.adapter.ClearMemoryAdapter 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);
}
Also used : QuickReturnListViewOnScrollListener(com.etiennelawlor.quickreturn.library.listeners.QuickReturnListViewOnScrollListener) CoreService(com.yzy.supercleanmaster.service.CoreService) Intent(android.content.Intent) ClearMemoryAdapter(com.yzy.supercleanmaster.adapter.ClearMemoryAdapter) DecimalFormatter(com.yzy.supercleanmaster.widget.textcounter.formatters.DecimalFormatter)

Aggregations

Intent (android.content.Intent)1 QuickReturnListViewOnScrollListener (com.etiennelawlor.quickreturn.library.listeners.QuickReturnListViewOnScrollListener)1 ClearMemoryAdapter (com.yzy.supercleanmaster.adapter.ClearMemoryAdapter)1 CoreService (com.yzy.supercleanmaster.service.CoreService)1 DecimalFormatter (com.yzy.supercleanmaster.widget.textcounter.formatters.DecimalFormatter)1