Search in sources :

Example 6 with Element

use of mehdi.sakout.aboutpage.Element in project VirtualXposed by android-hacker.

the class AboutActivity method getFeedbackWechatElement.

Element getFeedbackWechatElement() {
    Element feedback = new Element();
    final String weChatGroup = "CSYJZF";
    feedback.setTitle(getResources().getString(R.string.about_feedback_wechat_title, weChatGroup));
    feedback.setOnClickListener(v -> {
        ClipboardManager clipboardManager = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE);
        if (clipboardManager != null) {
            clipboardManager.setPrimaryClip(ClipData.newPlainText(null, weChatGroup));
        }
        Toast.makeText(v.getContext(), getResources().getString(R.string.about_feedback_tips), Toast.LENGTH_SHORT).show();
    });
    return feedback;
}
Also used : ClipboardManager(android.content.ClipboardManager) Element(mehdi.sakout.aboutpage.Element)

Example 7 with Element

use of mehdi.sakout.aboutpage.Element in project VirtualXposed by android-hacker.

the class AboutActivity 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.setIconTint(mehdi.sakout.aboutpage.R.color.about_item_icon_color);
    copyRightsElement.setIconNightTint(android.R.color.white);
    copyRightsElement.setGravity(Gravity.CENTER);
    copyRightsElement.setOnClickListener(v -> Toast.makeText(v.getContext(), copyrights, Toast.LENGTH_SHORT).show());
    return copyRightsElement;
}
Also used : Element(mehdi.sakout.aboutpage.Element)

Example 8 with Element

use of mehdi.sakout.aboutpage.Element in project VirtualXposed by android-hacker.

the class AboutActivity method getVersionElement.

Element getVersionElement() {
    Element version = new Element();
    String versionName = "unknown";
    try {
        PackageInfo packageInfo = getPackageManager().getPackageInfo(getPackageName(), 0);
        versionName = packageInfo.versionName;
    } catch (PackageManager.NameNotFoundException ignored) {
    }
    version.setTitle(getResources().getString(R.string.about_version_title, versionName));
    return version;
}
Also used : PackageManager(android.content.pm.PackageManager) PackageInfo(android.content.pm.PackageInfo) Element(mehdi.sakout.aboutpage.Element)

Example 9 with Element

use of mehdi.sakout.aboutpage.Element in project android-about-page by medyo.

the class MainActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Element adsElement = new Element();
    adsElement.setTitle("Advertise with us");
    View aboutPage = new AboutPage(this).isRTL(false).setImage(R.drawable.dummy_image).addItem(new Element().setTitle("Version 6.2")).addItem(adsElement).addGroup("Connect with us").addEmail("elmehdi.sakout@gmail.com").addWebsite("https://mehdisakout.com/").addFacebook("the.medy").addTwitter("medyo80").addYoutube("UCdPQtdWIsg7_pi4mrRu46vA").addPlayStore("com.ideashower.readitlater.pro").addInstagram("medyo80").addGitHub("medyo").addItem(getCopyRightsElement()).create();
    setContentView(aboutPage);
}
Also used : Element(mehdi.sakout.aboutpage.Element) AboutPage(mehdi.sakout.aboutpage.AboutPage) View(android.view.View)

Example 10 with Element

use of mehdi.sakout.aboutpage.Element in project MyNewCC98 by 6769.

the class AboutActivity method getOpenSources.

private Element getOpenSources() {
    Element opensrc = new Element();
    opensrc.setTitle(getString(R.string.application_opensources_license)).setIconDrawable(R.drawable.ic_info_outline_black_24dp);
    opensrc.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            OpenSrcActivity.startActivity(AboutActivity.this);
        }
    });
    return opensrc;
}
Also used : Element(mehdi.sakout.aboutpage.Element) View(android.view.View)

Aggregations

Element (mehdi.sakout.aboutpage.Element)12 View (android.view.View)5 ClipboardManager (android.content.ClipboardManager)2 AboutPage (mehdi.sakout.aboutpage.AboutPage)2 PackageInfo (android.content.pm.PackageInfo)1 PackageManager (android.content.pm.PackageManager)1 Nullable (android.support.annotation.Nullable)1 AlertDialog (android.support.v7.app.AlertDialog)1