mirror of https://github.com/M66B/FairEmail.git
Make sure text is measured
This commit is contained in:
parent
ee4c738942
commit
cb49ac0042
|
@ -1839,6 +1839,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
Pair<Integer, Integer> position = properties.getPosition(message.id);
|
Pair<Integer, Integer> position = properties.getPosition(message.id);
|
||||||
Log.i("Bind size=" + size + " height=" + height);
|
Log.i("Bind size=" + size + " height=" + height);
|
||||||
|
|
||||||
|
final int dp60 = Helper.dp2pixels(context, 60);
|
||||||
|
|
||||||
ibFull.setEnabled(hasWebView);
|
ibFull.setEnabled(hasWebView);
|
||||||
ibFull.setImageResource(show_full ? R.drawable.baseline_fullscreen_exit_24 : R.drawable.baseline_fullscreen_24);
|
ibFull.setImageResource(show_full ? R.drawable.baseline_fullscreen_exit_24 : R.drawable.baseline_fullscreen_24);
|
||||||
ibImages.setImageResource(show_images ? R.drawable.baseline_format_align_justify_24 : R.drawable.baseline_image_24);
|
ibImages.setImageResource(show_images ? R.drawable.baseline_format_align_justify_24 : R.drawable.baseline_image_24);
|
||||||
|
@ -1884,7 +1886,6 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
wvBody = webView;
|
wvBody = webView;
|
||||||
}
|
}
|
||||||
|
|
||||||
final int dp60 = Helper.dp2pixels(context, 60);
|
|
||||||
webView.setMinimumHeight(height == 0 ? dp60 : height);
|
webView.setMinimumHeight(height == 0 ? dp60 : height);
|
||||||
|
|
||||||
webView.init(
|
webView.init(
|
||||||
|
@ -1930,7 +1931,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
tvBody.setVisibility(View.GONE);
|
tvBody.setVisibility(View.GONE);
|
||||||
wvBody.setVisibility(View.VISIBLE);
|
wvBody.setVisibility(View.VISIBLE);
|
||||||
} else {
|
} else {
|
||||||
tvBody.setMinHeight(height);
|
tvBody.setMinHeight(height == 0 ? dp60 : height);
|
||||||
|
|
||||||
if (size != 0)
|
if (size != 0)
|
||||||
tvBody.setTextSize(TypedValue.COMPLEX_UNIT_PX, size);
|
tvBody.setTextSize(TypedValue.COMPLEX_UNIT_PX, size);
|
||||||
|
|
Loading…
Reference in New Issue