A nice about page based on MultiType, material design and very easy to use.
From the PureWriter App:
In your build.gradle
:
dependencies {
compile 'me.drakeet.support:about:2.0.2'
compile 'me.drakeet.multitype:multitype:3.3.3'
// extension for loading our host Android Links data
// compile 'me.drakeet.support:about-extension:2.0.2'
// for using the PicassoImageLoader
// compile 'com.squareup.picasso:picasso:2.5.2'
}
If you are using com.android.tools.build:gradle:3.+
, use this instead:
dependencies {
implementation 'me.drakeet.support:about:2.0.2'
implementation 'me.drakeet.multitype:multitype:3.3.3'
// extension for loading our host Android Links data
// implementation 'me.drakeet.support:about-extension:2.0.2'
// for using the PicassoImageLoader
// implementation 'com.squareup.picasso:picasso:2.5.2'
}
public class AboutActivity extends AbsAboutActivity {
@Override
protected void onCreateHeader(@NonNull ImageView icon, @NonNull TextView slogan, @NonNull TextView version) {
icon.setImageResource(R.mipmap.ic_launcher);
slogan.setText("About Page By drakeet");
version.setText("v" + BuildConfig.VERSION_NAME);
}
@Override
protected void onItemsCreated(@NonNull Items items) {
items.add(new Category("介绍与帮助"));
items.add(new Card(getString(R.string.card_content)));
items.add(new Category("Developers"));
items.add(new Contributor(R.drawable.avatar_drakeet, "drakeet", "Developer & designer", "http://weibo.com/drak11t"));
items.add(new Contributor(R.drawable.avatar_drakeet, "黑猫酱", "Developer", "https://drakeet.me"));
items.add(new Contributor(R.drawable.avatar_drakeet, "小艾大人", "Developer"));
items.add(new Category("Open Source Licenses"));
items.add(new License("MultiType", "drakeet", License.APACHE_2, "https://github.com/drakeet/MultiType"));
items.add(new License("about-page", "drakeet", License.APACHE_2, "https://github.com/drakeet/about-page"));
}
}
<style name="AppTheme.About" parent="Theme.AppCompat.DayNight.NoActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@android:color/black</item>
<!--optional-->
<item name="aboutPageHeaderBackground">reference|color</item>
<item name="aboutPageHeaderContentScrim">reference|color</item>
<item name="aboutPageHeaderTextColor">color</item>
<item name="aboutPageNavigationIcon">reference</item>
</style>