use of com.danielstone.materialaboutlibrary.model.MaterialAboutList in project material-about-library by daniel-stoneuk.
the class Demo method createMaterialAboutLicenseList.
public static MaterialAboutList createMaterialAboutLicenseList(final Context c, int colorIcon) {
MaterialAboutCard materialAboutLIbraryLicenseCard = ConvenienceBuilder.createLicenseCard(c, new IconicsDrawable(c).icon(CommunityMaterial.Icon.cmd_book).color(ContextCompat.getColor(c, colorIcon)).sizeDp(18), "material-about-library", "2016", "Daniel Stone", OpenSourceLicense.APACHE_2);
MaterialAboutCard androidIconicsLicenseCard = ConvenienceBuilder.createLicenseCard(c, new IconicsDrawable(c).icon(CommunityMaterial.Icon.cmd_book).color(ContextCompat.getColor(c, colorIcon)).sizeDp(18), "Android Iconics", "2016", "Mike Penz", OpenSourceLicense.APACHE_2);
MaterialAboutCard leakCanaryLicenseCard = ConvenienceBuilder.createLicenseCard(c, new IconicsDrawable(c).icon(CommunityMaterial.Icon.cmd_book).color(ContextCompat.getColor(c, colorIcon)).sizeDp(18), "LeakCanary", "2015", "Square, Inc", OpenSourceLicense.APACHE_2);
MaterialAboutCard mitLicenseCard = ConvenienceBuilder.createLicenseCard(c, new IconicsDrawable(c).icon(CommunityMaterial.Icon.cmd_book).color(ContextCompat.getColor(c, colorIcon)).sizeDp(18), "MIT Example", "2017", "Matthew Ian Thomson", OpenSourceLicense.MIT);
MaterialAboutCard gplLicenseCard = ConvenienceBuilder.createLicenseCard(c, new IconicsDrawable(c).icon(CommunityMaterial.Icon.cmd_book).color(ContextCompat.getColor(c, colorIcon)).sizeDp(18), "GPL Example", "2017", "George Perry Lindsay", OpenSourceLicense.GNU_GPL_3);
return new MaterialAboutList(materialAboutLIbraryLicenseCard, androidIconicsLicenseCard, leakCanaryLicenseCard, mitLicenseCard, gplLicenseCard);
}
use of com.danielstone.materialaboutlibrary.model.MaterialAboutList in project material-about-library by daniel-stoneuk.
the class Demo method createMaterialAboutLicenseList.
public static MaterialAboutList createMaterialAboutLicenseList(final Context c) {
MaterialAboutCard materialAboutLibraryLicenseCard = ConvenienceBuilder.createLicenseCard(c, new IconicsDrawable(c).icon(CommunityMaterial.Icon.cmd_book).sizeDp(18), "material-about-library", "2016", "Daniel Stone", OpenSourceLicense.APACHE_2);
MaterialAboutCard androidIconicsLicenseCard = ConvenienceBuilder.createLicenseCard(c, new IconicsDrawable(c).icon(CommunityMaterial.Icon.cmd_book).sizeDp(18), "Android Iconics", "2016", "Mike Penz", OpenSourceLicense.APACHE_2);
MaterialAboutCard leakCanaryLicenseCard = ConvenienceBuilder.createLicenseCard(c, new IconicsDrawable(c).icon(CommunityMaterial.Icon.cmd_book).sizeDp(18), "LeakCanary", "2015", "Square, Inc", OpenSourceLicense.APACHE_2);
MaterialAboutCard mitLicenseCard = ConvenienceBuilder.createLicenseCard(c, new IconicsDrawable(c).icon(CommunityMaterial.Icon.cmd_book).sizeDp(18), "MIT Example", "2017", "Matthew Ian Thomson", OpenSourceLicense.MIT);
MaterialAboutCard gplLicenseCard = ConvenienceBuilder.createLicenseCard(c, new IconicsDrawable(c).icon(CommunityMaterial.Icon.cmd_book).sizeDp(18), "GPL Example", "2017", "George Perry Lindsay", OpenSourceLicense.GNU_GPL_3);
return new MaterialAboutList(materialAboutLibraryLicenseCard, androidIconicsLicenseCard, leakCanaryLicenseCard, mitLicenseCard, gplLicenseCard);
}
use of com.danielstone.materialaboutlibrary.model.MaterialAboutList in project material-about-library by daniel-stoneuk.
the class ExampleMaterialAboutFragment method getMaterialAboutList.
@Override
protected MaterialAboutList getMaterialAboutList(final Context c) {
MaterialAboutList list = Demo.createMaterialAboutList(c, THEME_LIGHT);
list.getCards().get(2).getItems().add(createDynamicItem("Tap for a random number", c));
final MaterialAboutActionItem time = new MaterialAboutActionItem.Builder().text("Unix Time In Millis").subText("Time").icon(new IconicsDrawable(c).icon(CommunityMaterial.Icon.cmd_clock).sizeDp(18)).build();
list.getCards().get(2).getItems().add(time);
return list;
}
use of com.danielstone.materialaboutlibrary.model.MaterialAboutList in project TeamCityApp by vase4kin.
the class AboutFragment method getMaterialAboutList.
@Override
protected MaterialAboutList getMaterialAboutList(final Context context) {
MaterialAboutCard.Builder appCardBuilder = new MaterialAboutCard.Builder();
appCardBuilder.addItem(new MaterialAboutActionItem.Builder().text(getString(R.string.version)).icon(new IconDrawable(context, MaterialIcons.md_info_outline).colorRes(R.color.sub_text_color).sizeDp(24)).subText(BuildConfig.VERSION_NAME).build()).addItem(ConvenienceBuilder.createRateActionItem(context, new IconDrawable(context, MaterialIcons.md_star_border).colorRes(R.color.sub_text_color).sizeDp(24), getString(R.string.about_app_text_rate_app), null)).addItem(new MaterialAboutActionItem.Builder().text(R.string.about_app_text_found_issue).subText(R.string.about_app_subtext_found_issue).icon(new IconDrawable(context, MaterialIcons.md_question_answer).colorRes(R.color.sub_text_color).sizeDp(24)).setOnClickAction(new MaterialAboutItemOnClickAction() {
@Override
public void onClick() {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(getString(R.string.about_app_url_found_issue)));
getActivity().startActivity(intent);
}
}).build());
MaterialAboutCard.Builder miscCardBuilder = new MaterialAboutCard.Builder();
miscCardBuilder.addItem(new MaterialAboutActionItem.Builder().text(R.string.about_app_text_source_code).icon(new IconDrawable(context, MaterialCommunityIcons.mdi_github_circle).colorRes(R.color.sub_text_color).sizeDp(24)).setOnClickAction(new MaterialAboutItemOnClickAction() {
@Override
public void onClick() {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(getString(R.string.about_app_url_source_code)));
getActivity().startActivity(intent);
}
}).build()).addItem(new MaterialAboutActionItem.Builder().text(R.string.about_app_text_libraries).icon(new IconDrawable(context, MaterialCommunityIcons.mdi_github_circle).colorRes(R.color.sub_text_color).sizeDp(24)).setOnClickAction(new MaterialAboutItemOnClickAction() {
@Override
public void onClick() {
AboutLibrariesActivity.start(getActivity());
}
}).build());
MaterialAboutCard.Builder authorCardBuilder = new MaterialAboutCard.Builder();
authorCardBuilder.title(R.string.about_app_text_contacts);
authorCardBuilder.addItem(new MaterialAboutActionItem.Builder().text(R.string.about_app_text_github).icon(new IconDrawable(context, MaterialCommunityIcons.mdi_github_circle).colorRes(R.color.sub_text_color).sizeDp(24)).setOnClickAction(new MaterialAboutItemOnClickAction() {
@Override
public void onClick() {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(getString(R.string.about_app_url_github)));
getActivity().startActivity(intent);
}
}).build()).addItem(new MaterialAboutActionItem.Builder().text(R.string.about_app_text_telegram).icon(new IconDrawable(context, MaterialCommunityIcons.mdi_telegram).colorRes(R.color.sub_text_color).sizeDp(24)).setOnClickAction(new MaterialAboutItemOnClickAction() {
@Override
public void onClick() {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(getString(R.string.about_app_url_telegram)));
getActivity().startActivity(intent);
}
}).build()).addItem(ConvenienceBuilder.createEmailItem(context, new IconDrawable(context, MaterialIcons.md_email).colorRes(R.color.sub_text_color).sizeDp(24), getText(R.string.about_app_text_email), true, getString(R.string.about_app_email), getString(R.string.about_app_email_title)));
return new MaterialAboutList(appCardBuilder.build(), miscCardBuilder.build(), authorCardBuilder.build());
}
use of com.danielstone.materialaboutlibrary.model.MaterialAboutList in project Giua-App by Giua-app.
the class AboutActivity method createMaterialAboutLicenseList.
public static MaterialAboutList createMaterialAboutLicenseList(final Context c) {
MaterialAboutCard appIntroLicenseCard = ConvenienceBuilder.createLicenseCard(c, new IconicsDrawable(c).icon(CommunityMaterial.Icon.cmd_book).sizeDp(18), "AppIntro", "2015-2020", "AppIntro Developers", OpenSourceLicense.APACHE_2);
MaterialAboutCard giuaScraperLicenseCard = ConvenienceBuilder.createLicenseCard(c, new IconicsDrawable(c).icon(CommunityMaterial.Icon.cmd_book).sizeDp(18), "Giua Webscraper", "2021-2022", "Hiem, Franck1421 and contributors", OpenSourceLicense.GNU_GPL_3);
MaterialAboutCard caocLicenseCard = ConvenienceBuilder.createLicenseCard(c, new IconicsDrawable(c).icon(CommunityMaterial.Icon.cmd_book).sizeDp(18), "CustomActivityOnCrash", "", "Eduard Ereza MartÃnez", OpenSourceLicense.MIT);
MaterialAboutCard jsoupLicenseCard = ConvenienceBuilder.createLicenseCard(c, new IconicsDrawable(c).icon(CommunityMaterial.Icon.cmd_book).sizeDp(18), "JSoup", "2009-2021", "Jonathan Hedley", OpenSourceLicense.MIT);
MaterialAboutCard materialAboutLibraryLicenseCard = ConvenienceBuilder.createLicenseCard(c, new IconicsDrawable(c).icon(CommunityMaterial.Icon.cmd_book).sizeDp(18), "material-about-library", "2016", "Daniel Stone", OpenSourceLicense.APACHE_2);
MaterialAboutCard androidIconicsLicenseCard = ConvenienceBuilder.createLicenseCard(c, new IconicsDrawable(c).icon(CommunityMaterial.Icon.cmd_book).sizeDp(18), "Android Iconics", "2016", "Mike Penz", OpenSourceLicense.APACHE_2);
MaterialAboutCard leakCanaryLicenseCard = ConvenienceBuilder.createLicenseCard(c, new IconicsDrawable(c).icon(CommunityMaterial.Icon.cmd_book).sizeDp(18), "LeakCanary", "2015", "Square, Inc", OpenSourceLicense.APACHE_2);
MaterialAboutCard androidChartLicenseCard = ConvenienceBuilder.createLicenseCard(c, new IconicsDrawable(c).icon(CommunityMaterial.Icon.cmd_book).sizeDp(18), "MPAndroidChart", "2020", "Philipp Jahoda", OpenSourceLicense.APACHE_2);
MaterialAboutCard drawerLicenseCard = ConvenienceBuilder.createLicenseCard(c, new IconicsDrawable(c).icon(CommunityMaterial.Icon.cmd_book).sizeDp(18), "Material Drawer", "2021", "Mike Penz", OpenSourceLicense.APACHE_2);
MaterialAboutCard calendarLicenseCard = ConvenienceBuilder.createLicenseCard(c, new IconicsDrawable(c).icon(CommunityMaterial.Icon.cmd_book).sizeDp(18), "Compact Calendar View", "2017", "Sundeepk", OpenSourceLicense.MIT);
MaterialAboutCard glideLicenseCard = ConvenienceBuilder.createLicenseCard(c, new IconicsDrawable(c).icon(CommunityMaterial.Icon.cmd_book).sizeDp(18), "Glide", "2014", "bumptech", // FIXME: NON E' LA VERA LICENZA
OpenSourceLicense.APACHE_2);
return new MaterialAboutList(giuaScraperLicenseCard, appIntroLicenseCard, caocLicenseCard, jsoupLicenseCard, materialAboutLibraryLicenseCard, androidIconicsLicenseCard, leakCanaryLicenseCard, androidChartLicenseCard, drawerLicenseCard, calendarLicenseCard, glideLicenseCard);
}
Aggregations