From 897f8d058de02b54c33349565a21b8887c8541d2 Mon Sep 17 00:00:00 2001 From: Shinokuni Date: Sat, 9 Feb 2019 22:35:45 +0000 Subject: [PATCH] Fixing scrim visibility when no image is displayed --- app/src/main/java/com/readrops/app/ItemActivity.java | 2 ++ app/src/main/res/layout/activity_item.xml | 1 + 2 files changed, 3 insertions(+) diff --git a/app/src/main/java/com/readrops/app/ItemActivity.java b/app/src/main/java/com/readrops/app/ItemActivity.java index 367f0cc6..766fe144 100644 --- a/app/src/main/java/com/readrops/app/ItemActivity.java +++ b/app/src/main/java/com/readrops/app/ItemActivity.java @@ -70,6 +70,7 @@ public class ItemActivity extends AppCompatActivity { AppBarLayout appBarLayout = findViewById(R.id.app_bar_layout); ImageView imageView = findViewById(R.id.collapsing_layout_image); + View scrim = findViewById(R.id.collapsing_layout_scrim); webView = findViewById(R.id.item_webview); title = findViewById(R.id.activity_item_title); author = findViewById(R.id.activity_item_author); @@ -80,6 +81,7 @@ public class ItemActivity extends AppCompatActivity { appBarLayout.setExpanded(false); getSupportActionBar().setDisplayShowTitleEnabled(false); toolbarLayout.setTitleEnabled(false); + scrim.setVisibility(View.GONE); toolbar.setTitleTextColor(Color.WHITE); } else { diff --git a/app/src/main/res/layout/activity_item.xml b/app/src/main/res/layout/activity_item.xml index 2afd3b38..77f27c80 100644 --- a/app/src/main/res/layout/activity_item.xml +++ b/app/src/main/res/layout/activity_item.xml @@ -28,6 +28,7 @@ app:layout_collapseMode="parallax" />