aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2020-12-08 15:46:44 +0000
committerAlex Ning <chineseperson5@gmail.com>2020-12-08 15:46:44 +0000
commit7cf90856d6120e20a1c39848e0e4e2cbb40f1a67 (patch)
treefc07eb1f98b9220d3818b9ec6b7f1e3695d63298
parent22b0072b26dd268dfbb6b32c90f22036a1d506e7 (diff)
downloadinfinity-for-reddit-7cf90856d6120e20a1c39848e0e4e2cbb40f1a67.tar
infinity-for-reddit-7cf90856d6120e20a1c39848e0e4e2cbb40f1a67.tar.gz
infinity-for-reddit-7cf90856d6120e20a1c39848e0e4e2cbb40f1a67.tar.bz2
infinity-for-reddit-7cf90856d6120e20a1c39848e0e4e2cbb40f1a67.tar.lz
infinity-for-reddit-7cf90856d6120e20a1c39848e0e4e2cbb40f1a67.tar.xz
infinity-for-reddit-7cf90856d6120e20a1c39848e0e4e2cbb40f1a67.tar.zst
infinity-for-reddit-7cf90856d6120e20a1c39848e0e4e2cbb40f1a67.zip
Make the Bottom App Bar a standalone layout.
Diffstat (limited to '')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/activities/MainActivity.java12
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewSubredditDetailActivity.java12
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewUserDetailActivity.java12
-rw-r--r--app/src/main/res/layout/activity_view_subreddit_detail.xml4
-rw-r--r--app/src/main/res/layout/activity_view_user_detail.xml4
-rw-r--r--app/src/main/res/layout/app_bar_main.xml68
-rw-r--r--app/src/main/res/layout/bottom_app_bar_other_activities.xml (renamed from app/src/main/res/layout/bottom_app_bar_other_pages.xml)12
7 files changed, 32 insertions, 92 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/MainActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/MainActivity.java
index 9219de22..0fbf9f4f 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/MainActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/MainActivity.java
@@ -152,17 +152,17 @@ public class MainActivity extends BaseActivity implements SortTypeSelectionCallb
RecyclerView navDrawerRecyclerView;
@BindView(R.id.tab_layout_main_activity)
TabLayout tabLayout;
- @BindView(R.id.bottom_app_bar_main_activity)
+ @BindView(R.id.bottom_app_bar_bottom_app_bar)
BottomAppBar bottomAppBar;
- @BindView(R.id.linear_layout_bottom_app_bar_main_activity)
+ @BindView(R.id.linear_layout_bottom_app_bar)
LinearLayout linearLayoutBottomAppBar;
- @BindView(R.id.option_1_bottom_app_bar_main_activity)
+ @BindView(R.id.option_1_bottom_app_bar)
ImageView option1BottomAppBar;
- @BindView(R.id.option_2_bottom_app_bar_main_activity)
+ @BindView(R.id.option_2_bottom_app_bar)
ImageView option2BottomAppBar;
- @BindView(R.id.option_3_bottom_app_bar_main_activity)
+ @BindView(R.id.option_3_bottom_app_bar)
ImageView option3BottomAppBar;
- @BindView(R.id.option_4_bottom_app_bar_main_activity)
+ @BindView(R.id.option_4_bottom_app_bar)
ImageView option4BottomAppBar;
@BindView(R.id.fab_main_activity)
FloatingActionButton fab;
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewSubredditDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewSubredditDetailActivity.java
index de690c3d..de7b793d 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewSubredditDetailActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewSubredditDetailActivity.java
@@ -150,17 +150,17 @@ public class ViewSubredditDetailActivity extends BaseActivity implements SortTyp
TextView creationTimeTextView;
@BindView(R.id.description_text_view_view_subreddit_detail_activity)
TextView descriptionTextView;
- @BindView(R.id.bottom_navigation_view_subreddit_detail_activity)
+ @BindView(R.id.bottom_app_bar_bottom_app_bar)
BottomAppBar bottomNavigationView;
- @BindView(R.id.linear_layout_bottom_app_bar_view_subreddit_detail_activity)
+ @BindView(R.id.linear_layout_bottom_app_bar)
LinearLayout linearLayoutBottomAppBar;
- @BindView(R.id.option_1_bottom_app_bar_view_subreddit_detail_activity)
+ @BindView(R.id.option_1_bottom_app_bar)
ImageView option1BottomAppBar;
- @BindView(R.id.option_2_bottom_app_bar_view_subreddit_detail_activity)
+ @BindView(R.id.option_2_bottom_app_bar)
ImageView option2BottomAppBar;
- @BindView(R.id.option_3_bottom_app_bar_view_subreddit_detail_activity)
+ @BindView(R.id.option_3_bottom_app_bar)
ImageView option3BottomAppBar;
- @BindView(R.id.option_4_bottom_app_bar_view_subreddit_detail_activity)
+ @BindView(R.id.option_4_bottom_app_bar)
ImageView option4BottomAppBar;
@BindView(R.id.fab_view_subreddit_detail_activity)
FloatingActionButton fab;
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewUserDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewUserDetailActivity.java
index 47dd9cdf..d1c32368 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewUserDetailActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewUserDetailActivity.java
@@ -152,17 +152,17 @@ public class ViewUserDetailActivity extends BaseActivity implements SortTypeSele
TextView cakedayTextView;
@BindView(R.id.description_text_view_view_user_detail_activity)
TextView descriptionTextView;
- @BindView(R.id.bottom_navigation_view_subreddit_detail_activity)
+ @BindView(R.id.bottom_app_bar_bottom_app_bar)
BottomAppBar bottomNavigationView;
- @BindView(R.id.linear_layout_bottom_app_bar_view_subreddit_detail_activity)
+ @BindView(R.id.linear_layout_bottom_app_bar)
LinearLayout linearLayoutBottomAppBar;
- @BindView(R.id.option_1_bottom_app_bar_view_subreddit_detail_activity)
+ @BindView(R.id.option_1_bottom_app_bar)
ImageView option1BottomAppBar;
- @BindView(R.id.option_2_bottom_app_bar_view_subreddit_detail_activity)
+ @BindView(R.id.option_2_bottom_app_bar)
ImageView option2BottomAppBar;
- @BindView(R.id.option_3_bottom_app_bar_view_subreddit_detail_activity)
+ @BindView(R.id.option_3_bottom_app_bar)
ImageView option3BottomAppBar;
- @BindView(R.id.option_4_bottom_app_bar_view_subreddit_detail_activity)
+ @BindView(R.id.option_4_bottom_app_bar)
ImageView option4BottomAppBar;
@BindView(R.id.fab_view_user_detail_activity)
FloatingActionButton fab;
diff --git a/app/src/main/res/layout/activity_view_subreddit_detail.xml b/app/src/main/res/layout/activity_view_subreddit_detail.xml
index 529397c8..ef26b762 100644
--- a/app/src/main/res/layout/activity_view_subreddit_detail.xml
+++ b/app/src/main/res/layout/activity_view_subreddit_detail.xml
@@ -173,7 +173,7 @@
</com.google.android.material.appbar.AppBarLayout>
<include
- layout="@layout/bottom_app_bar_other_pages"
+ layout="@layout/bottom_app_bar_other_activities"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom" />
@@ -185,6 +185,6 @@
android:layout_margin="@dimen/fab_margin"
android:visibility="gone"
app:tint="@android:color/white"
- app:layout_anchor="@id/bottom_navigation_view_subreddit_detail_activity" />
+ app:layout_anchor="@id/bottom_app_bar_bottom_app_bar" />
</androidx.coordinatorlayout.widget.CoordinatorLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/activity_view_user_detail.xml b/app/src/main/res/layout/activity_view_user_detail.xml
index 4d86a13c..3ace2e08 100644
--- a/app/src/main/res/layout/activity_view_user_detail.xml
+++ b/app/src/main/res/layout/activity_view_user_detail.xml
@@ -140,7 +140,7 @@
</com.google.android.material.appbar.AppBarLayout>
<include
- layout="@layout/bottom_app_bar_other_pages"
+ layout="@layout/bottom_app_bar_other_activities"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom" />
@@ -152,6 +152,6 @@
android:layout_margin="@dimen/fab_margin"
android:visibility="gone"
app:tint="@android:color/white"
- app:layout_anchor="@id/bottom_navigation_view_subreddit_detail_activity" />
+ app:layout_anchor="@id/bottom_app_bar_bottom_app_bar" />
</androidx.coordinatorlayout.widget.CoordinatorLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/app_bar_main.xml b/app/src/main/res/layout/app_bar_main.xml
index e28e8138..c17ef9f7 100644
--- a/app/src/main/res/layout/app_bar_main.xml
+++ b/app/src/main/res/layout/app_bar_main.xml
@@ -51,71 +51,11 @@
android:layout_height="wrap_content"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
- <com.google.android.material.bottomappbar.BottomAppBar
- android:id="@+id/bottom_app_bar_main_activity"
+ <include
+ layout="@layout/bottom_app_bar_other_activities"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_gravity="bottom"
- android:visibility="gone"
- app:fabAlignmentMode="center">
-
- <LinearLayout
- android:id="@+id/linear_layout_bottom_app_bar_main_activity"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:paddingTop="6dp"
- android:weightSum="5">
-
- <ImageView
- android:id="@+id/option_1_bottom_app_bar_main_activity"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:gravity="center"
- android:paddingTop="8dp"
- android:paddingBottom="8dp"
- android:background="?attr/selectableItemBackgroundBorderless" />
-
- <ImageView
- android:id="@+id/option_2_bottom_app_bar_main_activity"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:gravity="center"
- android:paddingTop="8dp"
- android:paddingBottom="8dp"
- android:background="?attr/selectableItemBackgroundBorderless" />
-
- <TextView
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:background="@android:color/transparent"/>
-
- <ImageView
- android:id="@+id/option_3_bottom_app_bar_main_activity"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:gravity="center"
- android:paddingTop="8dp"
- android:paddingBottom="8dp"
- android:background="?attr/selectableItemBackgroundBorderless" />
-
- <ImageView
- android:id="@+id/option_4_bottom_app_bar_main_activity"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:layout_marginEnd="16dp"
- android:paddingTop="8dp"
- android:paddingBottom="8dp"
- android:gravity="center"
- android:background="?attr/selectableItemBackgroundBorderless" />
-
- </LinearLayout>
-
- </com.google.android.material.bottomappbar.BottomAppBar>
+ android:layout_gravity="bottom" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab_main_activity"
@@ -124,6 +64,6 @@
android:layout_margin="@dimen/fab_margin"
android:visibility="gone"
app:tint="@android:color/white"
- app:layout_anchor="@id/bottom_app_bar_main_activity" />
+ app:layout_anchor="@id/bottom_app_bar_bottom_app_bar" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
diff --git a/app/src/main/res/layout/bottom_app_bar_other_pages.xml b/app/src/main/res/layout/bottom_app_bar_other_activities.xml
index dd4c9bae..fa1d886f 100644
--- a/app/src/main/res/layout/bottom_app_bar_other_pages.xml
+++ b/app/src/main/res/layout/bottom_app_bar_other_activities.xml
@@ -1,21 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.bottomappbar.BottomAppBar xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
- android:id="@+id/bottom_navigation_view_subreddit_detail_activity"
+ android:id="@+id/bottom_app_bar_bottom_app_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
app:fabAlignmentMode="center">
<LinearLayout
- android:id="@+id/linear_layout_bottom_app_bar_view_subreddit_detail_activity"
+ android:id="@+id/linear_layout_bottom_app_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="6dp"
android:weightSum="5">
<ImageView
- android:id="@+id/option_1_bottom_app_bar_view_subreddit_detail_activity"
+ android:id="@+id/option_1_bottom_app_bar"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
@@ -25,7 +25,7 @@
android:background="?attr/selectableItemBackgroundBorderless" />
<ImageView
- android:id="@+id/option_2_bottom_app_bar_view_subreddit_detail_activity"
+ android:id="@+id/option_2_bottom_app_bar"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
@@ -41,7 +41,7 @@
android:background="@android:color/transparent"/>
<ImageView
- android:id="@+id/option_3_bottom_app_bar_view_subreddit_detail_activity"
+ android:id="@+id/option_3_bottom_app_bar"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
@@ -51,7 +51,7 @@
android:background="?attr/selectableItemBackgroundBorderless" />
<ImageView
- android:id="@+id/option_4_bottom_app_bar_view_subreddit_detail_activity"
+ android:id="@+id/option_4_bottom_app_bar"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"