use of com.moro.mtweaks.views.recyclerview.CardView in project MTweaks-KernelAdiutorMOD by morogoku.
the class WakeFrament method t2wInit.
private void t2wInit(List<RecyclerViewItem> items) {
CardView t2wCard = new CardView(getActivity());
t2wCard.setTitle(getString(R.string.t2w));
SelectView t2w = new SelectView();
t2w.setTitle(getString(R.string.t2w));
t2w.setSummary(getString(R.string.t2w_summary));
t2w.setItems(T2w.getMenu(getActivity()));
t2w.setItem(T2w.get());
t2w.setOnItemSelected(new SelectView.OnItemSelected() {
@Override
public void onItemSelected(SelectView selectView, int position, String item) {
T2w.set(position, getActivity());
}
});
t2wCard.addItem(t2w);
items.add(t2wCard);
}
use of com.moro.mtweaks.views.recyclerview.CardView in project MTweaks-KernelAdiutorMOD by morogoku.
the class WakeFrament method s2sInit.
private void s2sInit(List<RecyclerViewItem> items) {
CardView s2sCard = new CardView(getActivity());
s2sCard.setTitle(getString(R.string.s2s));
SelectView s2s = new SelectView();
s2s.setTitle(getString(R.string.s2s));
s2s.setSummary(getString(R.string.s2s_summary));
s2s.setItems(S2s.getMenu(getActivity()));
s2s.setItem(S2s.get());
s2s.setOnItemSelected(new SelectView.OnItemSelected() {
@Override
public void onItemSelected(SelectView selectView, int position, String item) {
S2s.set(position, getActivity());
}
});
s2sCard.addItem(s2s);
items.add(s2sCard);
}
use of com.moro.mtweaks.views.recyclerview.CardView in project MTweaks-KernelAdiutorMOD by morogoku.
the class WakeFrament method areaInit.
private void areaInit(List<RecyclerViewItem> items) {
CardView areaCard = new CardView(getActivity());
areaCard.setTitle(getString(R.string.area));
if (Dt2s.hasWidth()) {
final int w = getResources().getDisplayMetrics().widthPixels;
SeekBarView width = new SeekBarView();
width.setTitle(getString(R.string.width));
width.setUnit(getString(R.string.px));
width.setMax(w);
width.setMin(Math.round(w / 28.8f));
width.setProgress(Dt2s.getWidth() - Math.round(w / 28.8f));
width.setOnSeekBarListener(new SeekBarView.OnSeekBarListener() {
@Override
public void onStop(SeekBarView seekBarView, int position, String value) {
Dt2s.setWidth(position + Math.round(w / 28.8f), getActivity());
}
@Override
public void onMove(SeekBarView seekBarView, int position, String value) {
}
});
areaCard.addItem(width);
}
if (Dt2s.hasHeight()) {
final int h = getResources().getDisplayMetrics().heightPixels;
SeekBarView height = new SeekBarView();
height.setTitle(getString(R.string.height));
height.setUnit(getString(R.string.px));
height.setMax(h);
height.setMin(Math.round(h / 51.2f));
height.setProgress(Dt2s.getHeight() - Math.round(h / 51.2f));
height.setOnSeekBarListener(new SeekBarView.OnSeekBarListener() {
@Override
public void onStop(SeekBarView seekBarView, int position, String value) {
Dt2s.setHeight(position + Math.round(h / 51.2f), getActivity());
}
@Override
public void onMove(SeekBarView seekBarView, int position, String value) {
}
});
areaCard.addItem(height);
}
if (areaCard.size() > 0) {
items.add(areaCard);
}
}
use of com.moro.mtweaks.views.recyclerview.CardView in project MTweaks-KernelAdiutorMOD by morogoku.
the class WakeFrament method dt2wInit.
private void dt2wInit(List<RecyclerViewItem> items) {
CardView dt2wCard = new CardView(getActivity());
dt2wCard.setTitle(getString(R.string.dt2w));
SelectView dt2w = new SelectView();
dt2w.setTitle(getString(R.string.dt2w));
dt2w.setSummary(getString(R.string.dt2w_summary));
dt2w.setItems(Dt2w.getMenu(getActivity()));
dt2w.setItem(Dt2w.get());
dt2w.setOnItemSelected(new SelectView.OnItemSelected() {
@Override
public void onItemSelected(SelectView selectView, int position, String item) {
Dt2w.set(position, getActivity());
}
});
dt2wCard.addItem(dt2w);
items.add(dt2wCard);
}
use of com.moro.mtweaks.views.recyclerview.CardView in project MTweaks-KernelAdiutorMOD by morogoku.
the class AboutFragment method librariesInit.
private void librariesInit(List<RecyclerViewItem> items) {
CardView about = new CardView(getActivity());
about.setTitle(getString(R.string.app_version));
DescriptionView app = new DescriptionView();
app.setTitle(getString(R.string.app_name));
app.setSummary("v" + BuildConfig.VERSION_NAME);
about.addItem(app);
items.add(about);
CardView cardView = new CardView(getActivity());
cardView.setTitle(getString(R.string.libraries_used));
for (final String lib : sLibraries.keySet()) {
DescriptionView descriptionView = new DescriptionView();
descriptionView.setTitle(lib.split(",")[1]);
descriptionView.setSummary(lib.split(",")[0]);
descriptionView.setOnItemClickListener(new RecyclerViewItem.OnItemClickListener() {
@Override
public void onClick(RecyclerViewItem item) {
Utils.launchUrl(sLibraries.get(lib), getActivity());
}
});
cardView.addItem(descriptionView);
}
items.add(cardView);
}
Aggregations