Search in sources :

Example 1 with MaterialAboutList

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);
}
Also used : MaterialAboutList(com.danielstone.materialaboutlibrary.model.MaterialAboutList) MaterialAboutCard(com.danielstone.materialaboutlibrary.model.MaterialAboutCard) IconicsDrawable(com.mikepenz.iconics.IconicsDrawable)

Example 2 with MaterialAboutList

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);
}
Also used : MaterialAboutList(com.danielstone.materialaboutlibrary.model.MaterialAboutList) MaterialAboutCard(com.danielstone.materialaboutlibrary.model.MaterialAboutCard) IconicsDrawable(com.mikepenz.iconics.IconicsDrawable)

Example 3 with MaterialAboutList

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;
}
Also used : MaterialAboutList(com.danielstone.materialaboutlibrary.model.MaterialAboutList) MaterialAboutActionItem(com.danielstone.materialaboutlibrary.items.MaterialAboutActionItem) IconicsDrawable(com.mikepenz.iconics.IconicsDrawable)

Example 4 with MaterialAboutList

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());
}
Also used : MaterialAboutList(com.danielstone.materialaboutlibrary.model.MaterialAboutList) MaterialAboutItemOnClickAction(com.danielstone.materialaboutlibrary.items.MaterialAboutItemOnClickAction) MaterialAboutCard(com.danielstone.materialaboutlibrary.model.MaterialAboutCard) ConvenienceBuilder(com.danielstone.materialaboutlibrary.ConvenienceBuilder) MaterialAboutActionItem(com.danielstone.materialaboutlibrary.items.MaterialAboutActionItem) IconDrawable(com.joanzapata.iconify.IconDrawable) Intent(android.content.Intent)

Example 5 with MaterialAboutList

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);
}
Also used : MaterialAboutList(com.danielstone.materialaboutlibrary.model.MaterialAboutList) MaterialAboutCard(com.danielstone.materialaboutlibrary.model.MaterialAboutCard) IconicsDrawable(com.mikepenz.iconics.IconicsDrawable)

Aggregations

MaterialAboutList (com.danielstone.materialaboutlibrary.model.MaterialAboutList)7 MaterialAboutCard (com.danielstone.materialaboutlibrary.model.MaterialAboutCard)6 IconicsDrawable (com.mikepenz.iconics.IconicsDrawable)6 MaterialAboutActionItem (com.danielstone.materialaboutlibrary.items.MaterialAboutActionItem)4 Intent (android.content.Intent)3 ConvenienceBuilder (com.danielstone.materialaboutlibrary.ConvenienceBuilder)3 MaterialAboutItemOnClickAction (com.danielstone.materialaboutlibrary.items.MaterialAboutItemOnClickAction)2 MaterialAboutTitleItem (com.danielstone.materialaboutlibrary.items.MaterialAboutTitleItem)2 Context (android.content.Context)1 Uri (android.net.Uri)1 Html (android.text.Html)1 SpannableString (android.text.SpannableString)1 LinkMovementMethod (android.text.method.LinkMovementMethod)1 Linkify (android.text.util.Linkify)1 TextView (android.widget.TextView)1 NonNull (androidx.annotation.NonNull)1 Nullable (androidx.annotation.Nullable)1 AlertDialog (androidx.appcompat.app.AlertDialog)1 MaterialAboutActivity (com.danielstone.materialaboutlibrary.MaterialAboutActivity)1 OpenSourceLicense (com.danielstone.materialaboutlibrary.util.OpenSourceLicense)1