Tables control does not display numbers exceeding 5 digits
See original GitHub issue- Markwon version: 4.3.0
- Please specify expected/actual behavior
A bit strange, on my OPPO Reno ACE phone, the numbers in the table are not displayed when they exceed 5 digits. But it shows on my Xiaomi 6 phone.
- Please specify conditions/steps to reproduce (layout, code, markdown used, etc)
gradle
implementation "io.noties.markwon:core:4.3.0"
implementation "io.noties.markwon:image:4.3.0"
implementation "io.noties.markwon:ext-latex:4.3.0"
implementation 'io.noties.markwon:ext-strikethrough:4.3.0'
implementation 'io.noties.markwon:inline-parser:4.3.0'
implementation 'io.noties.markwon:image-picasso:4.3.0'
implementation 'io.noties.markwon:ext-tables:4.3.0'
implementation 'io.noties.markwon:linkify:4.3.0'
implementation('io.noties.markwon:syntax-highlight:4.3.0') {
exclude group: 'org.jetbrains'
}
implementation 'io.noties.markwon:ext-tasklist:4.3.0'
implementation 'io.noties.markwon:html:4.3.0'
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.19'
implementation("io.noties:prism4j:2.0.0") {
exclude group: 'org.jetbrains'
}
annotationProcessor 'io.noties:prism4j-bundler:2.0.0'
implementation 'com.caverock:androidsvg-aar:1.4'
layout
<ScrollView
android:id="@+id/scroll_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="20dp"
android:overScrollMode="never"
android:scrollbars="none"
>
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_markdown"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:lineSpacingExtra="6dp"
android:textSize="16sp" />
</ScrollView>
init
mMarkwon = Markwon
.builder(this)
.usePlugin(StrikethroughPlugin.create())
.usePlugin(LinkifyPlugin.create())
.usePlugin(TaskListPlugin.create(DetailMarkdownPlusActivity.this))
.usePlugin(SyntaxHighlightPlugin.create(new Prism4j(new MyGrammarLocator()), isNightMode() ? Prism4jThemeDarkula.create()
: Prism4jThemeDefault.create()))
.usePlugin(HtmlPlugin.create(new HtmlPlugin.HtmlConfigure() {
@Override
public void configureHtml(@NonNull HtmlPlugin plugin) {
plugin.addHandler(new AlignTagHandler());
}
}))
.usePlugin(TablePlugin.create(new TablePlugin.ThemeConfigure() {
@Override
public void configureTheme(@NonNull TableTheme.Builder builder) {
boolean nightMode = isNightMode();
builder
.tableBorderWidth(1)
.tableEvenRowBackgroundColor(Color.parseColor(nightMode ? "#4Dcccccc" : "#4D9EBCE2"))
.tableOddRowBackgroundColor(Color.parseColor(nightMode ? "#2Dcccccc" : "#2D9EBCE2"))
.tableCellPadding(DisplayUtils.dip2px(4));
}
}))
.usePlugin(ImagesPlugin.create(new ImagesPlugin.ImagesConfigure() {
@Override
public void configureImages(@NonNull ImagesPlugin plugin) {
plugin.addSchemeHandler(FileSchemeHandler.create());
plugin.addSchemeHandler(OkHttpNetworkSchemeHandler.create());
}
}))
.usePlugin(PicassoImagesPlugin.create(Picasso.get()))
.usePlugin(new AbstractMarkwonPlugin() {
@Override
public void beforeSetText(@NonNull TextView textView, @NonNull Spanned markdown) {
super.beforeSetText(textView, markdown);
AsyncDrawableScheduler.unschedule(textView);
}
@Override
public void afterSetText(@NonNull TextView textView) {
super.afterSetText(textView);
AsyncDrawableScheduler.schedule(textView);
}
})
.usePlugin(MarkwonInlineParserPlugin.create())
.usePlugin(JLatexMathPlugin.create(mEtMarkdown.getTextSize(), new JLatexMathPlugin.BuilderConfigure() {
@Override
public void configureBuilder(@NonNull JLatexMathPlugin.Builder builder) {
builder.inlinesEnabled(true);
}
}))
.build();
usage
Observable.just(content)
.map(new Function<String, Spanned>() {
@Override
public Spanned apply(String s) throws Exception {
return mMarkwon.toMarkdown(s);
}
})
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.as(AutoDispose.autoDisposable(AndroidLifecycleScopeProvider.from(DetailMarkdownPlusActivity.this)))
.subscribe(new Consumer<Spanned>() {
@Override
public void accept(Spanned str) throws Exception {
if (mMarkwon != null && mTvMarkdown != null && str != null) {
mMarkwon.setParsedMarkdown(mTvMarkdown, str);
}
}
}, Throwable :: printStackTrace);
when > 4 digits
before
after
when <= 4 digits
others
- I tried removing the margin of the ScrollView, but it didn’t work.
- I tried removing the cell padding of the Table Plugin, but it didn’t work.
so i have no idea how to solve this problem. can you help me ?
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (7 by maintainers)
Top Results From Across the Web
Set the field size - Microsoft Support
If the field contains data When you change the field size, Access truncates all the values in the field that exceed the specified...
Read more >php: quickest way to generate a 5-digit number not already in ...
Pre-populate your table and add a column to indicate that a number is unused. Select an unused number using LIMIT = 1 and...
Read more >Chapter 3. Data, Tables, and Database Design - O'Reilly
The Precision property sets the total number of digits that will be stored on both sides of the decimal point. Its maximum is...
Read more >How do I change the number display from scientific notation to ...
If the goal is to output enough digits to be able to transfer the values exactly in text form, then format long g...
Read more >Add auto-numbering records in a table - ServiceNow Docs
The number of digits can exceed the minimum length. For example, if Number of digits is 2 and more than 99 records are...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It is actually a bug in
ext-tables
because of which links are not displayed properlyGlad I could help @zhouzhuo810 🙌 !
Still I would like to keep this issue open until I investigate why tables are not displaying linkified content