From ca50abaaa6a9c52ce0fa6751f551dda51fec4bdd Mon Sep 17 00:00:00 2001 From: Jonathan de la Sen Minaya Date: Mon, 12 Oct 2020 16:48:30 +0200 Subject: [PATCH] Update README.md --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index d05f2c9..f07b5d7 100644 --- a/README.md +++ b/README.md @@ -139,6 +139,15 @@ These are a few possible combinations simpleToolbar.setRight3ClickListener(View.OnClickListener { TODO("Not yet implemented") }) ``` +##### Programmatically +```Kotlin + simpleToolbarProgrammatically.setIcons(null, null, null, null) + simpleToolbarProgrammatically.setTitle("From the code", false) + //simpleToolbarProgrammatically.getTitle() //Don't use it to set the text + simpleToolbarProgrammatically.setLeftIcon(ContextCompat.getDrawable(this, R.drawable.ic_chat_gradient)) + simpleToolbarProgrammatically.setRight1Icon(ContextCompat.getDrawable(this, R.drawable.ic_options), R.color.app_colorPrimary) +``` + ### Settings Combine these components to get your settings UI @@ -240,6 +249,17 @@ Combine these components to get your settings UI ``` +#### Programmatically +```Kotlin + settingsSubtextProgrammatically.setTitle(title = "From code") + settingsSubtextProgrammatically.setSubtext(subtext = "Subtext", subtextColor = resources.getColor(R.color.app_colorPrimary, null)) + settingsActionProgrammatically.setTitle(title = "From code", titleColor = resources.getColor(R.color.clean_ui_title_default, null)) + settingsCheckboxProgrammatically.setTitle(title = "From code", titleColor = resources.getColor(R.color.clean_ui_title_default, null), titleTextSize = 14f, titleTextStyle = TextStyle.BOLD) + +``` + + + ### Other #### TitleSection