Skip to content

About

Personal playground for Android

Topics

Resources

Stars

11 stars

Watchers

1 watching

Forks

Repository files navigation

How to show a dependency tree

./gradlew [module:]dependencies

How to build an Android app

./gradlew assemble[buildVariant]

How to install an Android app

./gradlew install[buildVariant]

Testing

How to run a local unit test

./gradlew [module:]test[buildVariant]UnitTest

How to run an instrumented test

./gradlew [module:]connected[buildVariant]AndroidTest

String

How to encode HTML entities

val encoded: String = "<>&'\"".htmlEncode() // &lt;&gt;&amp;&#39;&quot;

How to decode HTML entities

val decoded: String =
    Html.fromHtml("&lt;&gt;&amp;&#39;&quot;", Html.FROM_HTML_MODE_COMPACT).toString() // <>&'"

String.htmlEncode is a part of the Core KTX library and is syntactic sugar for TextUtils.htmlEncode .

How to convert AARRGGBB as Int to Color

val color: Color = Color.valueOf(0x11223344)

About

Personal playground for Android

Topics

Resources

Stars

11 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages