Theme legacy documentation warning about empty builder method

This commit is contained in:
Dimitry Ivanov 2019-01-30 14:25:35 +03:00
parent 27d0df0da1
commit cc75a92c7f
3 changed files with 14 additions and 5 deletions

View File

@ -22,7 +22,7 @@ Toast.makeText(context, markdown, Toast.LENGTH_LONG).show();
## Longer one
When you need to customize markdown parsing/rendering you can use [SpannableConfiguration](/docs/configure.md):
When you need to customize markdown parsing/rendering you can use [SpannableConfiguration](/docs/v2/configure.md):
```java
final SpannableConfiguration configuration = SpannableConfiguration.builder(context)

View File

@ -23,7 +23,7 @@ public interface Loader {
`AsyncDrawableLoader` from `markwon-image-loader` artifact can be used.
:::tip Install
[Learn how to add](/docs/v2/install.md#image-loader) `markwon-image-loader` to your project
[Learn how to add](/docs/v2/README.md#image-loader) `markwon-image-loader` to your project
:::
Default instance of `AsyncDrawableLoader` can be obtain like this:

View File

@ -2,11 +2,20 @@
# Theme
Here is the list of properties that can be configured via `SpannableTheme#builder` factory
method. If you wish to control what is out of this list, you can use [SpannableFactory](/docs/v2/factory.md)
Here is the list of properties that can be configured via `SpannableTheme`. If you wish to control what
is out of this list, you can use [SpannableFactory](/docs/v2/factory.md)
abstraction which lets you to gather full control of Spans that are used to display markdown.
* factory methods
* `SpannableTheme#create(Context)` - creates a **default** instance of `SpannableBuilder (with _defaults_ registered)
* `SpannableTheme#builder` - creates **empty** builder with **no defaults registered**
* `SpannableTheme#builderWithDefaults(Context)` - create a **default** instance of builder (with default values registered)
:::warning
`SpannbleTheme#builder` method has an unfortunate naming. It should've been `emptyBuilder`
or `builderNoDefaults` because `#builder` method returns a builder with <strong>no default
theme values registered</strong>. To create a builder **with** default values registered
use `SpannableBuilder#builderWithDefaults(Context)`
:::
## Link color