开源软件名称(OpenSource Name):ataulm/material-design-components-showcase开源软件地址(OpenSource Url):https://github.com/ataulm/material-design-components-showcase开源编程语言(OpenSource Language):Kotlin 100.0%开源软件介绍(OpenSource Introduction):material design components showcaseNick 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!
Add it as a dependency to your project: allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
implementation 'com.github.ataulm:material-design-components-showcase:<latest-release-or-commit>' 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 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)
) |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论