CocoQueen / about-page

A nice about page based on MultiType, material design and easy to use.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

about-page

License maven-central

A nice about page based on MultiType, material design and easy to use.

From the PureWriter App:

Get it on Google Play

Getting started

In your build.gradle:

dependencies {
    compile 'me.drakeet.support:about:1.4.2'
    compile 'me.drakeet.multitype:multitype:3.3.1'
}

Usage

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 Line());

        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 Line());

        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"));
    }
}

Custom style/theme

<style name="AppTheme.About" parent="Theme.AppCompat.Light.DarkActionBar">
    <item name="windowActionBar">false</item>
    <item name="windowNoTitle">true</item>
    <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>

TODO

  • Add a inner activity and builder for convenience

About

A nice about page based on MultiType, material design and easy to use.


Languages

Language:Java 100.0%