From 6bd4b41f8c7eeb112d00bc42658eace8ed3bcb85 Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Tue, 23 Apr 2019 08:03:29 +0800 Subject: Hide Toolbar when scrolling content up. --- .../infinityforreddit/ViewSubredditDetailActivity.java | 5 ----- .../ml/docilealligator/infinityforreddit/ViewUserDetailActivity.java | 4 ---- 2 files changed, 9 deletions(-) (limited to 'app/src/main/java/ml') diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/ViewSubredditDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/ViewSubredditDetailActivity.java index e5f94cf3..70cdda82 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/ViewSubredditDetailActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/ViewSubredditDetailActivity.java @@ -20,7 +20,6 @@ import androidx.lifecycle.ViewModelProviders; import com.bumptech.glide.Glide; import com.bumptech.glide.RequestManager; import com.bumptech.glide.request.RequestOptions; -import com.google.android.material.appbar.CollapsingToolbarLayout; import com.google.android.material.chip.Chip; import com.google.android.material.snackbar.Snackbar; @@ -93,10 +92,6 @@ public class ViewSubredditDetailActivity extends AppCompatActivity { String title = "r/" + subredditName; subredditNameTextView.setText(title); - - CollapsingToolbarLayout collapsingToolbarLayout = findViewById(R.id.collapsing_toolbar_layout_view_subreddit_detail_activity); - collapsingToolbarLayout.setTitleEnabled(false); - Toolbar toolbar = findViewById(R.id.toolbar); toolbar.setTitle(title); setSupportActionBar(toolbar); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/ViewUserDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/ViewUserDetailActivity.java index 00b9fe4b..0fb312fb 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/ViewUserDetailActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/ViewUserDetailActivity.java @@ -19,7 +19,6 @@ import androidx.lifecycle.ViewModelProviders; import com.bumptech.glide.Glide; import com.bumptech.glide.RequestManager; import com.bumptech.glide.request.RequestOptions; -import com.google.android.material.appbar.CollapsingToolbarLayout; import com.google.android.material.chip.Chip; import com.google.android.material.snackbar.Snackbar; @@ -90,9 +89,6 @@ public class ViewUserDetailActivity extends AppCompatActivity { String title = "u/" + userName; userNameTextView.setText(title); - CollapsingToolbarLayout collapsingToolbarLayout = findViewById(R.id.collapsing_toolbar_layout_view_user_detail_activity); - collapsingToolbarLayout.setTitleEnabled(false); - Toolbar toolbar = findViewById(R.id.toolbar); toolbar.setTitle(title); setSupportActionBar(toolbar); -- cgit v1.2.3