mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-01-01 13:57:10 +01:00
Customizing bottom app bar and fab in ViewSubredditDetailActivity is available.
This commit is contained in:
parent
8764852f6e
commit
878328c01c
@ -250,8 +250,11 @@ public class MainActivity extends BaseActivity implements SortTypeSelectionCallb
|
|||||||
|
|
||||||
int navBarHeight = getNavBarHeight();
|
int navBarHeight = getNavBarHeight();
|
||||||
if (navBarHeight > 0) {
|
if (navBarHeight > 0) {
|
||||||
|
CoordinatorLayout.LayoutParams params = (CoordinatorLayout.LayoutParams) fab.getLayoutParams();
|
||||||
|
params.bottomMargin += navBarHeight;
|
||||||
|
fab.setLayoutParams(params);
|
||||||
linearLayoutBottomAppBar.setPadding(0,
|
linearLayoutBottomAppBar.setPadding(0,
|
||||||
(int) (6 * getResources().getDisplayMetrics().density), 0, navBarHeight);
|
linearLayoutBottomAppBar.getPaddingTop(), 0, navBarHeight);
|
||||||
navDrawerRecyclerView.setPadding(0, 0, 0, navBarHeight);
|
navDrawerRecyclerView.setPadding(0, 0, 0, navBarHeight);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -449,12 +452,12 @@ public class MainActivity extends BaseActivity implements SortTypeSelectionCallb
|
|||||||
private void bottomAppBarOptionAction(int option) {
|
private void bottomAppBarOptionAction(int option) {
|
||||||
switch (option) {
|
switch (option) {
|
||||||
case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_SUBSCRIPTIONS: {
|
case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_SUBSCRIPTIONS: {
|
||||||
Intent intent = new Intent(MainActivity.this, SubscribedThingListingActivity.class);
|
Intent intent = new Intent(this, SubscribedThingListingActivity.class);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_MULTIREDDITS: {
|
case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_MULTIREDDITS: {
|
||||||
Intent intent = new Intent(MainActivity.this, SubscribedThingListingActivity.class);
|
Intent intent = new Intent(this, SubscribedThingListingActivity.class);
|
||||||
intent.putExtra(SubscribedThingListingActivity.EXTRA_SHOW_MULTIREDDITS, true);
|
intent.putExtra(SubscribedThingListingActivity.EXTRA_SHOW_MULTIREDDITS, true);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
break;
|
break;
|
||||||
|
@ -141,14 +141,14 @@ public class ViewSubredditDetailActivity extends BaseActivity implements SortTyp
|
|||||||
BottomAppBar bottomNavigationView;
|
BottomAppBar bottomNavigationView;
|
||||||
@BindView(R.id.linear_layout_bottom_app_bar_view_subreddit_detail_activity)
|
@BindView(R.id.linear_layout_bottom_app_bar_view_subreddit_detail_activity)
|
||||||
LinearLayout linearLayoutBottomAppBar;
|
LinearLayout linearLayoutBottomAppBar;
|
||||||
@BindView(R.id.subscriptions_bottom_app_bar_view_subreddit_detail_activity)
|
@BindView(R.id.option_1_bottom_app_bar_view_subreddit_detail_activity)
|
||||||
ImageView subscriptionsBottomAppBar;
|
ImageView option1BottomAppBar;
|
||||||
@BindView(R.id.go_back_to_main_page_bottom_app_bar_view_subreddit_detail_activity)
|
@BindView(R.id.option_2_bottom_app_bar_view_subreddit_detail_activity)
|
||||||
ImageView goBackToMainPageBottomAppBar;
|
ImageView option2BottomAppBar;
|
||||||
@BindView(R.id.message_bottom_app_bar_view_subreddit_detail_activity)
|
@BindView(R.id.option_3_bottom_app_bar_view_subreddit_detail_activity)
|
||||||
ImageView messageBottomAppBar;
|
ImageView option3BottomAppBar;
|
||||||
@BindView(R.id.profile_bottom_app_bar_view_subreddit_detail_activity)
|
@BindView(R.id.option_4_bottom_app_bar_view_subreddit_detail_activity)
|
||||||
ImageView profileBottomAppBar;
|
ImageView option4BottomAppBar;
|
||||||
@BindView(R.id.fab_view_subreddit_detail_activity)
|
@BindView(R.id.fab_view_subreddit_detail_activity)
|
||||||
FloatingActionButton fab;
|
FloatingActionButton fab;
|
||||||
@Inject
|
@Inject
|
||||||
@ -169,6 +169,9 @@ public class ViewSubredditDetailActivity extends BaseActivity implements SortTyp
|
|||||||
@Named("post_layout")
|
@Named("post_layout")
|
||||||
SharedPreferences mPostLayoutSharedPreferences;
|
SharedPreferences mPostLayoutSharedPreferences;
|
||||||
@Inject
|
@Inject
|
||||||
|
@Named("bottom_app_bar")
|
||||||
|
SharedPreferences bottomAppBarSharedPreference;
|
||||||
|
@Inject
|
||||||
CustomThemeWrapper mCustomThemeWrapper;
|
CustomThemeWrapper mCustomThemeWrapper;
|
||||||
public SubredditViewModel mSubredditViewModel;
|
public SubredditViewModel mSubredditViewModel;
|
||||||
private FragmentManager fragmentManager;
|
private FragmentManager fragmentManager;
|
||||||
@ -238,10 +241,8 @@ public class ViewSubredditDetailActivity extends BaseActivity implements SortTyp
|
|||||||
int navBarHeight = getNavBarHeight();
|
int navBarHeight = getNavBarHeight();
|
||||||
if (navBarHeight > 0) {
|
if (navBarHeight > 0) {
|
||||||
CoordinatorLayout.LayoutParams params = (CoordinatorLayout.LayoutParams) fab.getLayoutParams();
|
CoordinatorLayout.LayoutParams params = (CoordinatorLayout.LayoutParams) fab.getLayoutParams();
|
||||||
params.bottomMargin = navBarHeight;
|
params.bottomMargin += navBarHeight;
|
||||||
fab.setLayoutParams(params);
|
fab.setLayoutParams(params);
|
||||||
linearLayoutBottomAppBar.setPadding(0,
|
|
||||||
(int) (6 * getResources().getDisplayMetrics().density), 0, navBarHeight);
|
|
||||||
|
|
||||||
showToast = true;
|
showToast = true;
|
||||||
}
|
}
|
||||||
@ -458,10 +459,10 @@ public class ViewSubredditDetailActivity extends BaseActivity implements SortTyp
|
|||||||
descriptionTextView.setTextColor(primaryTextColor);
|
descriptionTextView.setTextColor(primaryTextColor);
|
||||||
bottomNavigationView.setBackgroundTint(ColorStateList.valueOf(mCustomThemeWrapper.getBottomAppBarBackgroundColor()));
|
bottomNavigationView.setBackgroundTint(ColorStateList.valueOf(mCustomThemeWrapper.getBottomAppBarBackgroundColor()));
|
||||||
int bottomAppBarIconColor = mCustomThemeWrapper.getBottomAppBarIconColor();
|
int bottomAppBarIconColor = mCustomThemeWrapper.getBottomAppBarIconColor();
|
||||||
subscriptionsBottomAppBar.setColorFilter(bottomAppBarIconColor, android.graphics.PorterDuff.Mode.SRC_IN);
|
option2BottomAppBar.setColorFilter(bottomAppBarIconColor, android.graphics.PorterDuff.Mode.SRC_IN);
|
||||||
goBackToMainPageBottomAppBar.setColorFilter(bottomAppBarIconColor, android.graphics.PorterDuff.Mode.SRC_IN);
|
option1BottomAppBar.setColorFilter(bottomAppBarIconColor, android.graphics.PorterDuff.Mode.SRC_IN);
|
||||||
messageBottomAppBar.setColorFilter(bottomAppBarIconColor, android.graphics.PorterDuff.Mode.SRC_IN);
|
option3BottomAppBar.setColorFilter(bottomAppBarIconColor, android.graphics.PorterDuff.Mode.SRC_IN);
|
||||||
profileBottomAppBar.setColorFilter(bottomAppBarIconColor, android.graphics.PorterDuff.Mode.SRC_IN);
|
option4BottomAppBar.setColorFilter(bottomAppBarIconColor, android.graphics.PorterDuff.Mode.SRC_IN);
|
||||||
applyTabLayoutTheme(tabLayout);
|
applyTabLayoutTheme(tabLayout);
|
||||||
applyFABTheme(fab);
|
applyFABTheme(fab);
|
||||||
unsubscribedColor = mCustomThemeWrapper.getUnsubscribed();
|
unsubscribedColor = mCustomThemeWrapper.getUnsubscribed();
|
||||||
@ -523,6 +524,52 @@ public class ViewSubredditDetailActivity extends BaseActivity implements SortTyp
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void bottomAppBarOptionAction(int option) {
|
||||||
|
switch (option) {
|
||||||
|
case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_HOME: {
|
||||||
|
EventBus.getDefault().post(new GoBackToMainPageEvent());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_SUBSCRIPTIONS: {
|
||||||
|
Intent intent = new Intent(this, SubscribedThingListingActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_INBOX: {
|
||||||
|
Intent intent = new Intent(this, InboxActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_PROFILE: {
|
||||||
|
Intent intent = new Intent(this, ViewUserDetailActivity.class);
|
||||||
|
intent.putExtra(ViewUserDetailActivity.EXTRA_USER_NAME_KEY, mAccountName);
|
||||||
|
startActivity(intent);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_MULTIREDDITS: {
|
||||||
|
Intent intent = new Intent(this, SubscribedThingListingActivity.class);
|
||||||
|
intent.putExtra(SubscribedThingListingActivity.EXTRA_SHOW_MULTIREDDITS, true);
|
||||||
|
startActivity(intent);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private int getBottomAppBarOptionDrawableResource(int option) {
|
||||||
|
switch (option) {
|
||||||
|
case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_HOME:
|
||||||
|
return R.drawable.ic_home_black_24dp;
|
||||||
|
case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_SUBSCRIPTIONS:
|
||||||
|
return R.drawable.ic_subscritptions_bottom_app_bar_24dp;
|
||||||
|
case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_INBOX:
|
||||||
|
return R.drawable.ic_inbox_24dp;
|
||||||
|
case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_MULTIREDDITS:
|
||||||
|
return R.drawable.ic_multi_reddit_24dp;
|
||||||
|
default:
|
||||||
|
return R.drawable.ic_account_circle_24dp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void bindView() {
|
private void bindView() {
|
||||||
if (mAccessToken != null) {
|
if (mAccessToken != null) {
|
||||||
if (mMessageFullname != null) {
|
if (mMessageFullname != null) {
|
||||||
@ -540,31 +587,52 @@ public class ViewSubredditDetailActivity extends BaseActivity implements SortTyp
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (showBottomAppBar) {
|
if (showBottomAppBar) {
|
||||||
|
int optionCount = bottomAppBarSharedPreference.getInt(SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_COUNT, 4);
|
||||||
|
int option1 = bottomAppBarSharedPreference.getInt(SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_1, SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_HOME);
|
||||||
|
int option2 = bottomAppBarSharedPreference.getInt(SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_2, SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_SUBSCRIPTIONS);
|
||||||
|
|
||||||
bottomNavigationView.setVisibility(View.VISIBLE);
|
bottomNavigationView.setVisibility(View.VISIBLE);
|
||||||
subscriptionsBottomAppBar.setOnClickListener(view -> {
|
|
||||||
Intent intent = new Intent(ViewSubredditDetailActivity.this, SubscribedThingListingActivity.class);
|
|
||||||
startActivity(intent);
|
|
||||||
});
|
|
||||||
|
|
||||||
subscriptionsBottomAppBar.setOnLongClickListener(view -> {
|
if (optionCount == 2) {
|
||||||
Intent intent = new Intent(ViewSubredditDetailActivity.this, SubscribedThingListingActivity.class);
|
linearLayoutBottomAppBar.setWeightSum(3);
|
||||||
intent.putExtra(SubscribedThingListingActivity.EXTRA_SHOW_MULTIREDDITS, true);
|
option1BottomAppBar.setVisibility(View.GONE);
|
||||||
startActivity(intent);
|
option3BottomAppBar.setVisibility(View.GONE);
|
||||||
return true;
|
|
||||||
});
|
|
||||||
|
|
||||||
goBackToMainPageBottomAppBar.setOnClickListener(view -> EventBus.getDefault().post(new GoBackToMainPageEvent()));
|
option2BottomAppBar.setImageResource(getBottomAppBarOptionDrawableResource(option1));
|
||||||
|
option4BottomAppBar.setImageResource(getBottomAppBarOptionDrawableResource(option2));
|
||||||
|
|
||||||
messageBottomAppBar.setOnClickListener(view -> {
|
option2BottomAppBar.setOnClickListener(view -> {
|
||||||
Intent intent = new Intent(this, InboxActivity.class);
|
bottomAppBarOptionAction(option1);
|
||||||
startActivity(intent);
|
});
|
||||||
});
|
|
||||||
|
|
||||||
profileBottomAppBar.setOnClickListener(view -> {
|
option4BottomAppBar.setOnClickListener(view -> {
|
||||||
Intent intent = new Intent(this, ViewUserDetailActivity.class);
|
bottomAppBarOptionAction(option2);
|
||||||
intent.putExtra(ViewUserDetailActivity.EXTRA_USER_NAME_KEY, mAccountName);
|
});
|
||||||
startActivity(intent);
|
} else {
|
||||||
});
|
int option3 = bottomAppBarSharedPreference.getInt(SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_3, SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_INBOX);
|
||||||
|
int option4 = bottomAppBarSharedPreference.getInt(SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_4, SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_PROFILE);
|
||||||
|
|
||||||
|
option1BottomAppBar.setImageResource(getBottomAppBarOptionDrawableResource(option1));
|
||||||
|
option2BottomAppBar.setImageResource(getBottomAppBarOptionDrawableResource(option2));
|
||||||
|
option3BottomAppBar.setImageResource(getBottomAppBarOptionDrawableResource(option3));
|
||||||
|
option4BottomAppBar.setImageResource(getBottomAppBarOptionDrawableResource(option4));
|
||||||
|
|
||||||
|
option1BottomAppBar.setOnClickListener(view -> {
|
||||||
|
bottomAppBarOptionAction(option1);
|
||||||
|
});
|
||||||
|
|
||||||
|
option2BottomAppBar.setOnClickListener(view -> {
|
||||||
|
bottomAppBarOptionAction(option2);
|
||||||
|
});
|
||||||
|
|
||||||
|
option3BottomAppBar.setOnClickListener(view -> {
|
||||||
|
bottomAppBarOptionAction(option3);
|
||||||
|
});
|
||||||
|
|
||||||
|
option4BottomAppBar.setOnClickListener(view -> {
|
||||||
|
bottomAppBarOptionAction(option4);
|
||||||
|
});
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
CoordinatorLayout.LayoutParams lp = (CoordinatorLayout.LayoutParams) fab.getLayoutParams();
|
CoordinatorLayout.LayoutParams lp = (CoordinatorLayout.LayoutParams) fab.getLayoutParams();
|
||||||
lp.setAnchorId(View.NO_ID);
|
lp.setAnchorId(View.NO_ID);
|
||||||
@ -572,7 +640,52 @@ public class ViewSubredditDetailActivity extends BaseActivity implements SortTyp
|
|||||||
fab.setLayoutParams(lp);
|
fab.setLayoutParams(lp);
|
||||||
}
|
}
|
||||||
|
|
||||||
fab.setOnClickListener(view -> postTypeBottomSheetFragment.show(getSupportFragmentManager(), postTypeBottomSheetFragment.getTag()));
|
int fabOption = bottomAppBarSharedPreference.getInt(SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB, SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_SUBMIT_POSTS);
|
||||||
|
switch (fabOption) {
|
||||||
|
case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_REFRESH:
|
||||||
|
fab.setImageResource(R.drawable.ic_refresh_black_24dp);
|
||||||
|
break;
|
||||||
|
case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_CHANGE_SORT_TYPE:
|
||||||
|
fab.setImageResource(R.drawable.ic_sort_toolbar_24dp);
|
||||||
|
break;
|
||||||
|
case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_CHANGE_POST_LAYOUT:
|
||||||
|
fab.setImageResource(R.drawable.ic_post_layout_black_24dp);
|
||||||
|
break;
|
||||||
|
case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_SEARCH:
|
||||||
|
fab.setImageResource(R.drawable.ic_search_black_24dp);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
fab.setImageResource(R.drawable.ic_add_day_night_24dp);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
fab.setOnClickListener(view -> {
|
||||||
|
switch (fabOption) {
|
||||||
|
case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_REFRESH: {
|
||||||
|
if (sectionsPagerAdapter != null) {
|
||||||
|
sectionsPagerAdapter.refresh();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_CHANGE_SORT_TYPE: {
|
||||||
|
sortTypeBottomSheetFragment.show(getSupportFragmentManager(), sortTypeBottomSheetFragment.getTag());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_CHANGE_POST_LAYOUT: {
|
||||||
|
postLayoutBottomSheetFragment.show(getSupportFragmentManager(), postLayoutBottomSheetFragment.getTag());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_SEARCH: {
|
||||||
|
Intent intent = new Intent(this, SearchActivity.class);
|
||||||
|
intent.putExtra(SearchActivity.EXTRA_SUBREDDIT_NAME, subredditName);
|
||||||
|
startActivity(intent);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
postTypeBottomSheetFragment.show(getSupportFragmentManager(), postTypeBottomSheetFragment.getTag());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
fab.setVisibility(View.VISIBLE);
|
fab.setVisibility(View.VISIBLE);
|
||||||
} else {
|
} else {
|
||||||
bottomNavigationView.setVisibility(View.GONE);
|
bottomNavigationView.setVisibility(View.GONE);
|
||||||
|
@ -164,6 +164,7 @@ public class SharedPreferencesUtils {
|
|||||||
public static final String OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_3 = "other_activities_bottom_app_bar_option_3";
|
public static final String OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_3 = "other_activities_bottom_app_bar_option_3";
|
||||||
public static final String OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_4 = "other_activities_bottom_app_bar_option_4";
|
public static final String OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_4 = "other_activities_bottom_app_bar_option_4";
|
||||||
public static final String OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB = "other_activities_bottom_app_bar_fab";
|
public static final String OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB = "other_activities_bottom_app_bar_fab";
|
||||||
|
|
||||||
public static final int MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_SUBSCRIPTIONS = 0;
|
public static final int MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_SUBSCRIPTIONS = 0;
|
||||||
public static final int MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_MULTIREDDITS = 1;
|
public static final int MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_MULTIREDDITS = 1;
|
||||||
public static final int MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_INBOX = 2;
|
public static final int MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_INBOX = 2;
|
||||||
@ -174,6 +175,17 @@ public class SharedPreferencesUtils {
|
|||||||
public static final int MAIN_ACTIVITY_BOTTOM_APP_BAR_FAB_CHANGE_POST_LAYOUT = 3;
|
public static final int MAIN_ACTIVITY_BOTTOM_APP_BAR_FAB_CHANGE_POST_LAYOUT = 3;
|
||||||
public static final int MAIN_ACTIVITY_BOTTOM_APP_BAR_FAB_SEARCH = 4;
|
public static final int MAIN_ACTIVITY_BOTTOM_APP_BAR_FAB_SEARCH = 4;
|
||||||
|
|
||||||
|
public static final int OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_HOME = 0;
|
||||||
|
public static final int OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_SUBSCRIPTIONS = 1;
|
||||||
|
public static final int OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_INBOX = 2;
|
||||||
|
public static final int OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_PROFILE = 3;
|
||||||
|
public static final int OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_MULTIREDDITS = 4;
|
||||||
|
public static final int OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_SUBMIT_POSTS = 0;
|
||||||
|
public static final int OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_REFRESH = 1;
|
||||||
|
public static final int OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_CHANGE_SORT_TYPE = 2;
|
||||||
|
public static final int OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_CHANGE_POST_LAYOUT = 3;
|
||||||
|
public static final int OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_SEARCH = 4;
|
||||||
|
|
||||||
public static final String NSFW_AND_SPOILER_SHARED_PREFERENCES_FILE = "ml.docilealligator.infinityforreddit.nsfw_and_spoiler";
|
public static final String NSFW_AND_SPOILER_SHARED_PREFERENCES_FILE = "ml.docilealligator.infinityforreddit.nsfw_and_spoiler";
|
||||||
public static final String NSFW_BASE = "_nsfw";
|
public static final String NSFW_BASE = "_nsfw";
|
||||||
public static final String BLUR_NSFW_BASE = "_blur_nsfw";
|
public static final String BLUR_NSFW_BASE = "_blur_nsfw";
|
||||||
|
@ -7,12 +7,6 @@
|
|||||||
android:id="@+id/coordinator_layout_view_subreddit_detail_activity"
|
android:id="@+id/coordinator_layout_view_subreddit_detail_activity"
|
||||||
tools:application=".Activity.ViewSubredditDetailActivity">
|
tools:application=".Activity.ViewSubredditDetailActivity">
|
||||||
|
|
||||||
<androidx.viewpager2.widget.ViewPager2
|
|
||||||
android:id="@+id/view_pager_view_subreddit_detail_activity"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
|
||||||
|
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
android:id="@+id/appbar_layout_view_subreddit_detail_activity"
|
android:id="@+id/appbar_layout_view_subreddit_detail_activity"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -172,6 +166,12 @@
|
|||||||
|
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
|
<androidx.viewpager2.widget.ViewPager2
|
||||||
|
android:id="@+id/view_pager_view_subreddit_detail_activity"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||||
|
|
||||||
<com.google.android.material.bottomappbar.BottomAppBar
|
<com.google.android.material.bottomappbar.BottomAppBar
|
||||||
android:id="@+id/bottom_navigation_view_subreddit_detail_activity"
|
android:id="@+id/bottom_navigation_view_subreddit_detail_activity"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -184,10 +184,11 @@
|
|||||||
android:id="@+id/linear_layout_bottom_app_bar_view_subreddit_detail_activity"
|
android:id="@+id/linear_layout_bottom_app_bar_view_subreddit_detail_activity"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingTop="6dp"
|
||||||
android:weightSum="5">
|
android:weightSum="5">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/go_back_to_main_page_bottom_app_bar_view_subreddit_detail_activity"
|
android:id="@+id/option_1_bottom_app_bar_view_subreddit_detail_activity"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
@ -198,7 +199,7 @@
|
|||||||
android:background="?attr/selectableItemBackgroundBorderless" />
|
android:background="?attr/selectableItemBackgroundBorderless" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/subscriptions_bottom_app_bar_view_subreddit_detail_activity"
|
android:id="@+id/option_2_bottom_app_bar_view_subreddit_detail_activity"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
@ -215,7 +216,7 @@
|
|||||||
android:background="@android:color/transparent"/>
|
android:background="@android:color/transparent"/>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/message_bottom_app_bar_view_subreddit_detail_activity"
|
android:id="@+id/option_3_bottom_app_bar_view_subreddit_detail_activity"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
@ -226,7 +227,7 @@
|
|||||||
android:background="?attr/selectableItemBackgroundBorderless" />
|
android:background="?attr/selectableItemBackgroundBorderless" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/profile_bottom_app_bar_view_subreddit_detail_activity"
|
android:id="@+id/option_4_bottom_app_bar_view_subreddit_detail_activity"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
|
@ -45,18 +45,6 @@
|
|||||||
|
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
<!--<com.google.android.material.tabs.TabLayout
|
|
||||||
android:id="@+id/tab_layout_main_activity"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="bottom"
|
|
||||||
app:layout_scrollFlags="scroll|enterAlways"
|
|
||||||
app:tabGravity="fill"
|
|
||||||
app:tabIndicatorHeight="3dp"
|
|
||||||
app:tabMode="fixed"
|
|
||||||
app:tabRippleColor="?attr/colorControlHighlight"
|
|
||||||
app:tabUnboundedRipple="false" />-->
|
|
||||||
|
|
||||||
<androidx.viewpager2.widget.ViewPager2
|
<androidx.viewpager2.widget.ViewPager2
|
||||||
android:id="@+id/view_pager_main_activity"
|
android:id="@+id/view_pager_main_activity"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -75,6 +63,7 @@
|
|||||||
android:id="@+id/linear_layout_bottom_app_bar_main_activity"
|
android:id="@+id/linear_layout_bottom_app_bar_main_activity"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingTop="6dp"
|
||||||
android:weightSum="5">
|
android:weightSum="5">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
@ -248,6 +248,7 @@
|
|||||||
<item>Subscriptions</item>
|
<item>Subscriptions</item>
|
||||||
<item>Inbox</item>
|
<item>Inbox</item>
|
||||||
<item>Profile</item>
|
<item>Profile</item>
|
||||||
|
<item>Multireddits</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<string-array name="settings_bottom_app_bar_fab_options">
|
<string-array name="settings_bottom_app_bar_fab_options">
|
||||||
|
Loading…
Reference in New Issue
Block a user