use of mehdi.sakout.aboutpage.Element in project VirtualXposed by android-hacker.
the class AboutActivity method getFeedbackElement.
Element getFeedbackElement() {
Element feedback = new Element();
final String qqGroup = "597478474";
feedback.setTitle(getResources().getString(R.string.about_feedback_title, qqGroup));
feedback.setOnClickListener(v -> {
ClipboardManager clipboardManager = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE);
if (clipboardManager != null) {
clipboardManager.setPrimaryClip(ClipData.newPlainText(null, qqGroup));
}
Toast.makeText(v.getContext(), getResources().getString(R.string.about_feedback_tips), Toast.LENGTH_SHORT).show();
});
return feedback;
}
use of mehdi.sakout.aboutpage.Element in project VirtualXposed by android-hacker.
the class AboutActivity method getThanksElement.
Element getThanksElement() {
Element thanks = new Element();
thanks.setTitle(getResources().getString(R.string.about_thanks));
thanks.setOnClickListener(v -> {
AlertDialog alertDialog = new AlertDialog.Builder(this, R.style.Theme_AppCompat_DayNight_Dialog_Alert).setTitle(R.string.thanks_dialog_title).setMessage(R.string.thanks_dialog_content).setPositiveButton(R.string.about_icon_yes, null).create();
try {
alertDialog.show();
} catch (Throwable ignored) {
// BadTokenException.
}
});
return thanks;
}
use of mehdi.sakout.aboutpage.Element in project VirtualXposed by android-hacker.
the class AboutActivity method getCheckUpdateElement.
Element getCheckUpdateElement() {
Element checkUpdate = new Element();
checkUpdate.setTitle(getResources().getString(R.string.check_update));
checkUpdate.setOnClickListener(v -> {
VAVersionService.checkUpdateImmediately(getApplicationContext(), true);
});
return checkUpdate;
}
use of mehdi.sakout.aboutpage.Element in project MyNewCC98 by 6769.
the class AboutActivity method getShareAppRow.
private Element getShareAppRow() {
Element row = new Element();
String title = getString(R.string.application_share_to_download_title);
String downloadUrl = getString(R.string.application_share_to_download_url);
String messageTemplate = getString(R.string.application_share_to_download_template);
String text = String.format(messageTemplate, downloadUrl, getString(R.string.app_name));
row.setTitle(title).setIconDrawable(R.drawable.ic_share_black_24dp);
row.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
ShareContent.shareText(AboutActivity.this, text, title);
}
});
return row;
}
use of mehdi.sakout.aboutpage.Element in project android-about-page by medyo.
the class MainActivity method getCopyRightsElement.
Element getCopyRightsElement() {
Element copyRightsElement = new Element();
final String copyrights = String.format(getString(R.string.copy_right), Calendar.getInstance().get(Calendar.YEAR));
copyRightsElement.setTitle(copyrights);
copyRightsElement.setIconDrawable(R.drawable.about_icon_copy_right);
copyRightsElement.setAutoApplyIconTint(true);
copyRightsElement.setIconTint(mehdi.sakout.aboutpage.R.color.about_item_icon_color);
copyRightsElement.setIconNightTint(android.R.color.white);
copyRightsElement.setGravity(Gravity.CENTER);
copyRightsElement.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(MainActivity.this, copyrights, Toast.LENGTH_SHORT).show();
}
});
return copyRightsElement;
}
Aggregations