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