mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-11-07 03:07:26 +01:00
Fix flairs contains only images not shown.
This commit is contained in:
parent
a3367c193b
commit
38ce4db311
@ -78,6 +78,8 @@ public class SearchActivity extends BaseActivity {
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
((Infinity) getApplication()).getAppComponent().inject(this);
|
||||
|
||||
setImmersiveModeNotApplicable();
|
||||
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
setContentView(R.layout.activity_search);
|
||||
|
@ -87,10 +87,10 @@ public class GlideImageGetter implements Html.ImageGetter {
|
||||
int drawableWidth = (int) (drawable.getIntrinsicWidth() * density);
|
||||
int drawableHeight = (int) (drawable.getIntrinsicHeight() * density);
|
||||
float ratio = (float) drawableWidth / (float) drawableHeight;
|
||||
drawableHeight = (int) textSize;
|
||||
drawableHeight = (int) (textSize * 1.5);
|
||||
drawableWidth = (int) (drawableHeight * ratio);
|
||||
int maxWidth = container.get().getMeasuredWidth();
|
||||
if ((drawableWidth > maxWidth) || matchParentWidth) {
|
||||
if ((maxWidth > 0 && (drawableWidth > maxWidth)) || matchParentWidth) {
|
||||
int calculatedHeight = maxWidth * drawableHeight / drawableWidth;
|
||||
drawable.setBounds(0, 0, maxWidth, calculatedHeight);
|
||||
setBounds(0, 0, maxWidth, calculatedHeight);
|
||||
|
Loading…
Reference in New Issue
Block a user