Need help with material-design-components-showcase?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

ataulm
209 Stars 7 Forks Apache License 2.0 15 Commits 2 Opened issues

Description

A glorified layout file to which you can apply your Android theme

Services available

!
?

Need anything else?

Contributors list

material design components showcase

Nick Rout added this awesome debug activity to MuVi which showcases Material components with a given theme. This library follows the same idea, but saves you from having to do the same in every app that you have!

Light preview

Dark preview
light mode dark mode

Add it as a dependency to your project:

allprojects {
    repositories {
        maven { url "https://jitpack.io" }
    }
}

implementation 'com.github.ataulm:material-design-components-showcase:'

Then open the included Activity:

class DebugActivity : AppCompatActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    setContentView(R.layout.activity_debug)

    openThemeShowcaseButton.setOnClickListener {
        startMdcShowcase()
    }
}

}

We can specify a particular theme to load too (by default it'll take the application theme):

startMdcShowcase(R.style.Theme_Demo)

There's a MaterialToolbar too, which we can set with a flag:

startMdcShowcase(R.style.Theme_Demo, shouldSetSupportActionBar = true)

If you want to customise the layout, you can pass an

ArrayList
of layout resources, each of which will be inflated as a separate row.
startMdcShowcase(R.style.Theme_Demo, inflatables = arrayListOf(R.layout.demo_custom_inflatable))

If you want to augment the default set, you can include the original one too:

startMdcShowcase(
    R.style.Theme_Demo,
    shouldSetSupportActionBar = true,
    inflatables = arrayListOf(R.layout.mdcs__default_inflatable, R.layout.demo_custom_inflatable)
)

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.