Fixing scrim visibility when no image is displayed

This commit is contained in:
Shinokuni 2019-02-09 22:35:45 +00:00
parent b9e19098eb
commit 897f8d058d
2 changed files with 3 additions and 0 deletions

View File

@ -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 {

View File

@ -28,6 +28,7 @@
app:layout_collapseMode="parallax" />
<View
android:id="@+id/collapsing_layout_scrim"
android:layout_width="match_parent"
android:layout_height="160dp"
android:layout_gravity="bottom"