diff options
-rw-r--r-- | app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SearchActivity.java | 2 | ||||
-rw-r--r-- | app/src/main/java/ml/docilealligator/infinityforreddit/Utils/GlideImageGetter.java | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SearchActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SearchActivity.java index 3fd343f4..78ab544c 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SearchActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SearchActivity.java @@ -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); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Utils/GlideImageGetter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Utils/GlideImageGetter.java index fc8cfcf9..f3cef706 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Utils/GlideImageGetter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Utils/GlideImageGetter.java @@ -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); |