From 9f17c06a9fef28571940aec8d113e121918e9389 Mon Sep 17 00:00:00 2001 From: oneHamidreza Date: Thu, 30 Apr 2020 01:33:12 +0430 Subject: [PATCH] ViewExt.kt updated to handle xml colors --- README.md | 5 +++-- Sample/src/main/kotlin/sample/widget/ViewExt.kt | 7 +++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index a3c6744..561075e 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,7 @@ class App : MeowApp() { // Layout Direction would be set automatically by Android System. // (Example: "en": LayoutDirection.LTR "fa": LayoutDirection.RTL). + // Our Primary Sample app's language is English. override fun getLanguage(context: Context?) = "en" // or any language such as ("fa","fr","ar",etc.) // Our Sample app's theme is set by Android System Light/Dark (Day/Night) mode. @@ -476,8 +477,8 @@ loadingAlert(R.string.loading_title_custom).show() Learn more about it at [AlertsFragment](/sample/ui/material/alert/AlertsFragment.kt) ### CardView There are some customized styles related to `Material CardView`. -|Style|Usage -|----------|:-------------:| +|Style|Usage +|----------|:-------------:| |`Meow.CardView`|Regular Card with `surface` background color |`Meow.CardView.Outlined`|Outlined Card with `surface` background color and `stroke_color.xml` outline color diff --git a/Sample/src/main/kotlin/sample/widget/ViewExt.kt b/Sample/src/main/kotlin/sample/widget/ViewExt.kt index 57325ed..923964b 100644 --- a/Sample/src/main/kotlin/sample/widget/ViewExt.kt +++ b/Sample/src/main/kotlin/sample/widget/ViewExt.kt @@ -49,17 +49,16 @@ class MyGrammarLocator : GrammarLocator { ): Grammar? { return when (language) { "clike" -> Prism_clike.create(prism4j) - "groovy" -> Prism_groovy.create(prism4j) + "groovy", "properties" -> Prism_groovy.create(prism4j) "json" -> Prism_json.create(prism4j) "kotlin" -> Prism_kotlin.create(prism4j) - "markup" -> Prism_markup.create(prism4j) - "properties" -> Prism_groovy.create(prism4j) + "markup", "xml" -> Prism_markup.create(prism4j) else -> null } } override fun languages() = - setOf("clike", "groovy", "json", "kotlin", "markup", "properties") + setOf("clike", "groovy", "json", "kotlin", "markup", "properties", "xml") } fun TextView.setMarkdownData(markdownData: String?) {