From 2a091043c64647cebb41de46d545deb3f0e1b8e0 Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 15 Dec 2020 09:20:44 +0100 Subject: [PATCH] Prepare new layout with bottom menu + hide top bar when scrolling --- .../exodusprivacy/MainActivity.java | 4 ++ app/src/main/res/layout/main.xml | 71 +++++++++++++++---- app/src/main/res/values/styles.xml | 2 +- 3 files changed, 63 insertions(+), 14 deletions(-) diff --git a/app/src/main/java/org/eu/exodus_privacy/exodusprivacy/MainActivity.java b/app/src/main/java/org/eu/exodus_privacy/exodusprivacy/MainActivity.java index 21c3b13..7a71cc3 100644 --- a/app/src/main/java/org/eu/exodus_privacy/exodusprivacy/MainActivity.java +++ b/app/src/main/java/org/eu/exodus_privacy/exodusprivacy/MainActivity.java @@ -35,6 +35,7 @@ import android.widget.PopupMenu; import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.widget.SearchView; +import androidx.appcompat.widget.Toolbar; import androidx.databinding.DataBindingUtil; import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentTransaction; @@ -113,6 +114,9 @@ public class MainActivity extends AppCompatActivity { } }; + Toolbar toolbar = findViewById(R.id.toolbar); + setSupportActionBar(toolbar); + TrackerListAdapter.OnTrackerClickListener onTrackerClickListener = id -> { TrackerFragment tracker = TrackerFragment.newInstance(id); tracker.setOnAppClickListener(onAppClickListener); diff --git a/app/src/main/res/layout/main.xml b/app/src/main/res/layout/main.xml index 33f8b63..e4abc60 100644 --- a/app/src/main/res/layout/main.xml +++ b/app/src/main/res/layout/main.xml @@ -1,20 +1,65 @@ - - - + + + + + + + tools:context=".MainActivity"> + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 914d971..9f37cbb 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -1,7 +1,7 @@ -