Fix table row span width calculation
This commit is contained in:
parent
5451a2722e
commit
851172a785
@ -72,7 +72,7 @@ ext {
|
||||
'commonmark-table' : "com.atlassian.commonmark:commonmark-ext-gfm-tables:$commonMarkVersion",
|
||||
'android-svg' : 'com.caverock:androidsvg:1.4',
|
||||
'android-gif' : 'pl.droidsonroids.gif:android-gif-drawable:1.2.15',
|
||||
'jlatexmath-android' : 'ru.noties:jlatexmath-android:0.1.2',
|
||||
'jlatexmath-android' : 'ru.noties:jlatexmath-android:0.2.0-SNAPSHOT',
|
||||
'okhttp' : 'com.squareup.okhttp3:okhttp:3.9.0',
|
||||
'prism4j' : 'io.noties:prism4j:2.0.0',
|
||||
'debug' : 'io.noties:debug:5.0.0@jar',
|
||||
|
@ -151,8 +151,9 @@ public class TableRowSpan extends ReplacementSpan {
|
||||
int bottom,
|
||||
@NonNull Paint p) {
|
||||
|
||||
if (recreateLayouts(SpanUtils.width(canvas, text))) {
|
||||
width = canvas.getWidth();
|
||||
final int spanWidth = SpanUtils.width(canvas, text);
|
||||
if (recreateLayouts(spanWidth)) {
|
||||
width = spanWidth;
|
||||
// @since 4.3.1 it's important to cast to TextPaint in order to display links, etc
|
||||
if (p instanceof TextPaint) {
|
||||
// there must be a reason why this method receives Paint instead of TextPaint...
|
||||
|
@ -14,6 +14,7 @@
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textColor="#000"
|
||||
android:textSize="16sp"
|
||||
android:padding="8dip"
|
||||
tools:text="whatever" />
|
||||
|
||||
</ScrollView>
|
Loading…
x
Reference in New Issue
Block a user