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(new View.OnClickListener() { @Override public void onClick(View v) { Toast.makeText(MainActivity.this, copyrights, Toast.LENGTH_SHORT).show(); } }); return copyRightsElement; }
e001.setOnClickListener(new View.OnClickListener()
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Element i8Element = new Element("icons8", "Icons from icons8.com",mehdi.sakout.aboutpage.R.drawable.about_icon_link); i8Element.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent i = new Intent(Intent.ACTION_VIEW); i.setData(Uri.parse("https://icons8.com")); startActivity(i); } }); View aboutPage = new AboutPage(this) .isRTL(false) .setImage(R.drawable.ic_puff) .setDescription(getString(R.string.about_puff)) .addGroup("Connect with us") .addEmail("bob.sun@outlook.ie") .addWebsite("http://bobsun.website/") .addGitHub("SpongeBobSun") .addItem(i8Element) .addGroup("About the name") .addGroup("Blowfish Puffs!") .create(); setContentView(aboutPage); }