Search in sources :

Example 1 with ButtonView2

use of com.moro.mtweaks.views.recyclerview.ButtonView2 in project MTweaks-KernelAdiutorMOD by morogoku.

the class ScreenFragment method restoreValuesInit.

private void restoreValuesInit(List<RecyclerViewItem> items) {
    ButtonView2 bv = new ButtonView2();
    bv.setSummary(getString(R.string.restore_summary));
    bv.setButtonText(getString(R.string.restore_button));
    bv.setOnItemClickListener(new ButtonView2.OnItemClickListener() {

        @Override
        public void onClick(RecyclerViewItem item) {
            Calibration.restoreCalibrationStockValues(getActivity());
            FragmentTransaction ft = getFragmentManager().beginTransaction();
            ft.replace(R.id.content_frame, new ScreenFragment()).commit();
        }
    });
    items.add(bv);
}
Also used : FragmentTransaction(android.support.v4.app.FragmentTransaction) ButtonView2(com.moro.mtweaks.views.recyclerview.ButtonView2) RecyclerViewItem(com.moro.mtweaks.views.recyclerview.RecyclerViewItem)

Aggregations

FragmentTransaction (android.support.v4.app.FragmentTransaction)1 ButtonView2 (com.moro.mtweaks.views.recyclerview.ButtonView2)1 RecyclerViewItem (com.moro.mtweaks.views.recyclerview.RecyclerViewItem)1