Skip to content
Henry Tao edited this page Jun 1, 2016 · 2 revisions

android-md-core

AppCompat and Google Support Design are really awesome but they also have some limitations. Theming android app is not an easy task, especially keeping consistent UI on both Lollipop and Non-Lollipop devices is even harder. If you've tried CardView, Spinner, Theme, you know what I mean. So, I propose android-md-core - Material bootstrap for Android development like Bootstrap or Foundation for web.

I am working hard to predefine element styles as many as I can. If you find that it still doesn't meet your need, don't hesitate to send me a request. I love to work with you to solve problems. Send a request HERE

Installation

compile "me.henrytao:mdcore:<latest-version>"
  • android-md-core is an UI library and pretty much depended on AppCompat and Support Design. So that, versioning is quite the same with those libraries from Google.
  • android-md-core is deployed to jCenter. Make sure you have jcenter() in your project gradle.

Usages

STEP 1. Setup BaseActivity

public abstract class BaseActivity extends AppCompatActivity {

  @Override
  protected void onCreate(@Nullable Bundle savedInstanceState) {
    // This method should be called before calling super
    MdCore.init(this);
    super.onCreate(savedInstanceState);
  }
}

STEP 2. Setup theme using either MdTheme.Light or MdTheme.Dark

<style name="AppTheme" parent="MdTheme.Light">

</style>

<style name="AppTheme.Dark" parent="MdTheme.Dark">

</style>
Clone this wiki locally