use of com.moro.mtweaks.views.recyclerview.ImageView in project MTweaks-KernelAdiutorMOD by morogoku.
the class DonationFragment method addItems.
@Override
protected void addItems(List<RecyclerViewItem> items) {
TitleView title = new TitleView();
title.setText(getString(R.string.donation_title));
items.add(title);
DescriptionView desc = new DescriptionView();
desc.setDrawable(getResources().getDrawable(R.drawable.logo));
desc.setSummary(getString(R.string.donation_summary));
desc.setOnItemClickListener(new RecyclerViewItem.OnItemClickListener() {
@Override
public void onClick(RecyclerViewItem item) {
Utils.launchUrl("https://www.paypal.me/morogoku", getActivity());
}
});
items.add(desc);
String leng = Locale.getDefault().getLanguage();
ImageView img = new ImageView();
if (leng.contains("es")) {
img.setDrawable(getResources().getDrawable(R.drawable.ic_donar_paypal));
} else {
img.setDrawable(getResources().getDrawable(R.drawable.ic_donate_paypal));
}
img.setOnItemClickListener(new RecyclerViewItem.OnItemClickListener() {
@Override
public void onClick(RecyclerViewItem item) {
Utils.launchUrl("https://www.paypal.me/morogoku", getActivity());
}
});
items.add(img);
}
Aggregations