本文整理汇总了Java中com.danielstone.materialaboutlibrary.model.MaterialAboutList类的典型用法代码示例。如果您正苦于以下问题:Java MaterialAboutList类的具体用法?Java MaterialAboutList怎么用?Java MaterialAboutList使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
MaterialAboutList类属于com.danielstone.materialaboutlibrary.model包,在下文中一共展示了MaterialAboutList类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getMaterialAboutList
import com.danielstone.materialaboutlibrary.model.MaterialAboutList; //导入依赖的package包/类
@Override
protected MaterialAboutList getMaterialAboutList(Context context) {
// Build the cards
MaterialAboutCard.Builder appCardBuilder = new MaterialAboutCard.Builder();
buildApp(this, appCardBuilder);
MaterialAboutCard.Builder authorCardBuilder = new MaterialAboutCard.Builder();
buildAuthor(this, authorCardBuilder);
MaterialAboutCard.Builder contributeCardBuilder = new MaterialAboutCard.Builder();
buildContribute(this, contributeCardBuilder);
return new MaterialAboutList.Builder()
.addCard(appCardBuilder.build())
.addCard(authorCardBuilder.build())
.addCard(contributeCardBuilder.build())
.build();
}
示例2: onTaskFinished
import com.danielstone.materialaboutlibrary.model.MaterialAboutList; //导入依赖的package包/类
private void onTaskFinished(@Nullable MaterialAboutList materialAboutList) {
if (materialAboutList != null) {
list = materialAboutList;
adapter.swapData(list);
if (shouldAnimate()) {
recyclerView.animate()
.alpha(1f)
.translationY(0f)
.setDuration(400)
.setInterpolator(new FastOutSlowInInterpolator()).start();
} else {
recyclerView.setAlpha(1f);
recyclerView.setTranslationY(0f);
}
} else {
finish();//?? why we remain here anyway?
}
}
示例3: getMaterialAboutList
import com.danielstone.materialaboutlibrary.model.MaterialAboutList; //导入依赖的package包/类
@NonNull
@Override
protected MaterialAboutList getMaterialAboutList(@NonNull Context context)
{
MaterialAboutCard.Builder appCardBuilder = new MaterialAboutCard.Builder();
appCardBuilder.addItem(new MaterialAboutTitleItem.Builder()
.text(getString(R.string.app_name))
.icon(R.drawable.ic_app)
.build());
appCardBuilder.addItem(new MaterialAboutActionItem.Builder()
.text("Licenses")
.icon(new IconDrawable(context, FontAwesomeIcons.fa_file_text).sizeDp(18))
.setOnClickAction(() ->
context.startActivity(LicenseActivity.createIntent(context)))
.build());
MaterialAboutCard.Builder authorCardBuilder = new MaterialAboutCard.Builder();
authorCardBuilder.title("Author");
authorCardBuilder.addItem(new MaterialAboutActionItem.Builder()
.text("Josh Laird")
.subText("London, UK")
.icon(new IconDrawable(context, FontAwesomeIcons.fa_user).sizeDp(18))
.build());
authorCardBuilder.addItem(new MaterialAboutActionItem.Builder()
.text("Fork on Github")
.icon(new IconDrawable(context, FontAwesomeIcons.fa_github).sizeDp(18))
.setOnClickAction(() ->
{
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://github.com/jbmlaird"));
startActivity(intent);
})
.build());
return new MaterialAboutList(appCardBuilder.build(), authorCardBuilder.build());
}
示例4: getMaterialAboutList
import com.danielstone.materialaboutlibrary.model.MaterialAboutList; //导入依赖的package包/类
@NonNull
@Override
protected MaterialAboutList getMaterialAboutList(@NonNull Context context)
{
MaterialAboutCard discogsBrowser = buildMaterialAboutCard(context, context.getString(R.string.app_name), R.string.license_mit, "2017", "Josh Laird");
MaterialAboutCard rxJavaRxAndroid = buildMaterialAboutCard(context, "RxJava2/RxAndroid", R.string.license_apache2, "2016-present", "RxJava Contributors");
MaterialAboutCard retrofit2 = buildMaterialAboutCard(context, "Retrofit2", R.string.license_apache2, "2013", "Square, Inc.");
MaterialAboutCard rxCache = buildMaterialAboutCard(context, "RxCache", R.string.license_apache2, "2015", "Victor Albertos");
MaterialAboutCard dagger2 = buildMaterialAboutCard(context, "ButterKnife", R.string.license_apache2, "2012", "The Dagger Authors");
MaterialAboutCard butterKnife = buildMaterialAboutCard(context, "ButterKnife", R.string.license_apache2, "2013", "Jake Wharton");
MaterialAboutCard materialDrawer = buildMaterialAboutCard(context, "MaterialDrawer", R.string.license_apache2, "2016", "Mike Penz");
MaterialAboutCard rxBinding2 = buildMaterialAboutCard(context, "RxBinding2", R.string.license_apache2, "2015", "Jake Wharton");
MaterialAboutCard leakCanary = buildMaterialAboutCard(context, "RxRelay", R.string.license_apache2, "2015", "Square, Inc.");
MaterialAboutCard rxRelay = buildMaterialAboutCard(context, "RxRelay", R.string.license_apache2, "2015", "Jake Wharton");
MaterialAboutCard jSoup = buildMaterialAboutCard(context, "Jsoup", R.string.license_mit, "2009-2017", "Jonathon Hedley");
MaterialAboutCard circleImageView = buildMaterialAboutCard(context, "CircleImageView", R.string.license_apache2, "2014-2017", "Henning Dodenhof");
MaterialAboutCard materialDialogs = buildMaterialAboutCard(context, "Material Dialogs", R.string.license_mit, "2014-2017", "Aidan Michael Follestad");
MaterialAboutCard rxSocialConnect = buildMaterialAboutCard(context, "RxSocialConnect", R.string.license_apache2, "2016", "Boilerplate");
MaterialAboutCard greenDao = buildMaterialAboutCard(context, "GreenDAO", R.string.license_apache2, "2016", "greenrobot");
MaterialAboutCard loadingButtonAndroid = buildMaterialAboutCard(context, "LoadingButtonAndroid", R.string.license_mit, "2016", "leandroBorgesFerreira");
MaterialAboutCard toasty = buildMaterialAboutCard(context, "Toasty", R.string.license_gpl, "2017", "GrenderG");
MaterialAboutCard materialAboutLibrary = buildMaterialAboutCard(context, "Material About Library", R.string.license_apache2, "2016", "Daniel Stone");
MaterialAboutCard tapTargetView = buildMaterialAboutCard(context, "TapTargetView", R.string.license_apache2, "2016", "Keepsafe Software Inc.");
MaterialAboutCard youTubeAndroidPlayer = buildMaterialAboutCard(context, "YouTube Android Player", R.string.license_apache2, "2017", "YouTube");
MaterialAboutCard conductor = buildMaterialAboutCard(context, "Conductor", R.string.license_apache2, "2016-2017", "BlueLine Labs");
MaterialAboutCard draggablePanel = buildMaterialAboutCard(context, "Draggable Panel", R.string.license_apache2, "2014", "Pedro Vicente Gómez Sánchez");
return new MaterialAboutList(discogsBrowser, rxJavaRxAndroid, retrofit2, rxCache, dagger2, butterKnife, materialDrawer, rxBinding2, leakCanary, rxRelay,
jSoup, circleImageView, materialDialogs, rxSocialConnect, greenDao, loadingButtonAndroid, toasty, materialAboutLibrary, tapTargetView,
youTubeAndroidPlayer, conductor, draggablePanel);
}
示例5: getMaterialAboutList
import com.danielstone.materialaboutlibrary.model.MaterialAboutList; //导入依赖的package包/类
@NonNull
@Override
protected MaterialAboutList getMaterialAboutList(@NonNull Context context) {
MaterialAboutCard.Builder appBuilder = new MaterialAboutCard.Builder();
buildApp(appBuilder, context);
MaterialAboutCard.Builder authorBuilder = new MaterialAboutCard.Builder();
buildAuthor(authorBuilder, context);
MaterialAboutCard.Builder shareBuilder = new MaterialAboutCard.Builder();
buildShare(shareBuilder, context);
return new MaterialAboutList(appBuilder.build(), authorBuilder.build(), shareBuilder.build());
}
示例6: getMaterialAboutList
import com.danielstone.materialaboutlibrary.model.MaterialAboutList; //导入依赖的package包/类
@Override
protected MaterialAboutList getMaterialAboutList(Context context) {
final AboutConfig config = AboutConfig.getInstance();
return new MaterialAboutList.Builder()
.addCard(buildGeneralInfoCard(config))
.addCard(buildSupportCard(config))
.addCard(buildShareCard(config))
.addCard(buildAboutCard(config))
.addCard(buildSocialNetworksCard(config))
.addCard(buildPrivacyCard(config))
.build();
}
示例7: onPostExecute
import com.danielstone.materialaboutlibrary.model.MaterialAboutList; //导入依赖的package包/类
@Override
protected void onPostExecute(MaterialAboutList materialAboutList) {
super.onPostExecute(materialAboutList);
if (context.get() != null) {
if (!context.get().isFinishing()) {
context.get().onTaskFinished(materialAboutList);
}
}
context = null;
}
示例8: getMaterialAboutList
import com.danielstone.materialaboutlibrary.model.MaterialAboutList; //导入依赖的package包/类
@NonNull @Override
protected MaterialAboutList getMaterialAboutList(@NonNull final Context c) {
return AboutApp.createMaterialAboutLicenseList(c, colorIcon);
}
示例9: getMaterialAboutList
import com.danielstone.materialaboutlibrary.model.MaterialAboutList; //导入依赖的package包/类
@NonNull
@Override
protected MaterialAboutList getMaterialAboutList(@NonNull final Context c) {
return AboutApp.createMaterialAboutList(c, colorIcon, getIntent().getIntExtra(THEME_EXTRA, THEME_LIGHT_DARKBAR));
}
示例10: getMaterialAboutList
import com.danielstone.materialaboutlibrary.model.MaterialAboutList; //导入依赖的package包/类
@NonNull
@Override
protected MaterialAboutList getMaterialAboutList(@NonNull final Context c) {
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),
"BRVAH", "2016", "陈宇明",
OpenSourceLicense.APACHE_2);
MaterialAboutCard mitLicenseCard = ConvenienceBuilder.createLicenseCard(c,
new IconicsDrawable(c)
.icon(CommunityMaterial.Icon.cmd_book)
.color(ContextCompat.getColor(c, colorIcon))
.sizeDp(18),
"Jsoup", "2017", "Jonathan Hedley",
OpenSourceLicense.MIT);
return new MaterialAboutList(materialAboutLIbraryLicenseCard,
androidIconicsLicenseCard,
leakCanaryLicenseCard,
mitLicenseCard);
}
示例11: getMaterialAboutList
import com.danielstone.materialaboutlibrary.model.MaterialAboutList; //导入依赖的package包/类
@Override
protected MaterialAboutList getMaterialAboutList(final Context c) {
return About_content.createMaterialAboutList(c);
}
示例12: getMaterialAboutList
import com.danielstone.materialaboutlibrary.model.MaterialAboutList; //导入依赖的package包/类
@Override
protected MaterialAboutList getMaterialAboutList(final Context c) {
return Demo.createMaterialAboutList(c, R.color.mal_color_icon_dark_theme, THEME_LIGHT_DARKBAR);
}
示例13: createMaterialAboutLicenseList
import com.danielstone.materialaboutlibrary.model.MaterialAboutList; //导入依赖的package包/类
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);
}
示例14: getMaterialAboutList
import com.danielstone.materialaboutlibrary.model.MaterialAboutList; //导入依赖的package包/类
@NonNull @Override
protected MaterialAboutList getMaterialAboutList(@NonNull final Context c) {
MaterialAboutCard.Builder advancedCardBuilder = new MaterialAboutCard.Builder();
advancedCardBuilder.title("Advanced");
advancedCardBuilder.addItem(new MaterialAboutTitleItem.Builder()
.text("TitleItem OnClickAction")
.icon(R.mipmap.ic_launcher)
.setOnClickAction(ConvenienceBuilder.createWebsiteOnClickAction(c, Uri.parse("http://www.daniel-stone.uk")))
.build());
advancedCardBuilder.addItem(new MaterialAboutActionItem.Builder()
.text("Snackbar demo")
.icon(new IconicsDrawable(c)
.icon(CommunityMaterial.Icon.cmd_code_tags)
.color(ContextCompat.getColor(c, colorIcon))
.sizeDp(18))
.setOnClickAction(new MaterialAboutItemOnClickAction() {
@Override
public void onClick() {
Snackbar.make(((ExampleMaterialAboutActivity) c).findViewById(R.id.mal_material_about_activity_coordinator_layout), "Test", Snackbar.LENGTH_SHORT).show();
}
})
.build());
advancedCardBuilder.addItem(new MaterialAboutActionItem.Builder()
.text("OnLongClickAction demo")
.icon(new IconicsDrawable(c)
.icon(CommunityMaterial.Icon.cmd_hand_pointing_right)
.color(ContextCompat.getColor(c, colorIcon))
.sizeDp(18))
.setOnLongClickAction(new MaterialAboutItemOnClickAction() {
@Override
public void onClick() {
Toast.makeText(c, "Long pressed", Toast.LENGTH_SHORT).show();
}
})
.build());
advancedCardBuilder.addItem(new MyCustomItem.Builder()
.text("Custom Item")
.icon(new IconicsDrawable(c)
.icon(CommunityMaterial.Icon.cmd_code_braces)
.color(ContextCompat.getColor(c, colorIcon))
.sizeDp(18))
.build());
final MaterialAboutActionItem dynamicItem = new MaterialAboutActionItem.Builder()
.text("Dynamic UI")
.subText("Tap for a random number.")
.icon(new IconicsDrawable(c)
.icon(CommunityMaterial.Icon.cmd_refresh)
.color(ContextCompat.getColor(c, colorIcon)
).sizeDp(18))
.build();
dynamicItem.setOnClickAction(new MaterialAboutItemOnClickAction() {
@Override
public void onClick() {
dynamicItem.setSubText("Random number: " + ((int) (Math.random() * 10)));
refreshMaterialAboutList();
}
});
advancedCardBuilder.addItem(dynamicItem);
return Demo.createMaterialAboutList(c, colorIcon, getIntent().getIntExtra(THEME_EXTRA, THEME_LIGHT_DARKBAR)).addCard(advancedCardBuilder.build());
}
示例15: getMaterialAboutList
import com.danielstone.materialaboutlibrary.model.MaterialAboutList; //导入依赖的package包/类
@NonNull @Override
protected MaterialAboutList getMaterialAboutList(@NonNull final Context c) {
return Demo.createMaterialAboutLicenseList(c, colorIcon);
}
开发者ID:daniel-stoneuk,项目名称:material-about-library,代码行数:5,代码来源:ExampleMaterialAboutLicenseActivity.java