Search code examples
androidmarkwon

Markwon: list bullet size / style?


I'm trying to use the Markwon markdown library. https://noties.io/Markwon/

On my screen, list bullets are rendering too large.

enter image description here

(And also not centered).

I'm wondering if there's a way to style the bullets?


Solution

  • Answer was provided by Mike M. in comments.

    It looks like you can specify a bullet width through a custom MarkwonTheme. The MarkwonTheme.Builder there has a bulletWidth(int) method that takes a measure in pixels.

    final Markwon markwon = Markwon.builder(getContext())
        .usePlugin(new AbstractMarkwonPlugin() {
          @Override
          public void configureTheme(@NonNull MarkwonTheme.Builder builder) {
            builder.bulletWidth(6); // pixels
          }
        })
        .build();
    

    This is for Markwon 4.4.0.