Customizing the bottom app bar in MainActivity is available (Changing option count is not available right now.

This commit is contained in:
Alex Ning 2020-09-25 16:35:27 +08:00
parent 1b983c1ff8
commit f33d4dbc61
5 changed files with 173 additions and 55 deletions

View File

@ -143,18 +143,18 @@ public class MainActivity extends BaseActivity implements SortTypeSelectionCallb
RecyclerView navDrawerRecyclerView; RecyclerView navDrawerRecyclerView;
@BindView(R.id.tab_layout_main_activity) @BindView(R.id.tab_layout_main_activity)
TabLayout tabLayout; TabLayout tabLayout;
@BindView(R.id.bottom_navigation_main_activity) @BindView(R.id.bottom_app_bar_main_activity)
BottomAppBar bottomNavigationView; BottomAppBar bottomAppBar;
@BindView(R.id.linear_layout_bottom_app_bar_main_activity) @BindView(R.id.linear_layout_bottom_app_bar_main_activity)
LinearLayout linearLayoutBottomAppBar; LinearLayout linearLayoutBottomAppBar;
@BindView(R.id.subscriptions_bottom_app_bar_main_activity) @BindView(R.id.option_1_bottom_app_bar_main_activity)
ImageView subscriptionsBottomAppBar; ImageView option1BottomAppBar;
@BindView(R.id.multi_reddit_bottom_app_bar_main_activity) @BindView(R.id.option_2_bottom_app_bar_main_activity)
ImageView multiRedditBottomAppBar; ImageView option2BottomAppBar;
@BindView(R.id.message_bottom_app_bar_main_activity) @BindView(R.id.option_3_bottom_app_bar_main_activity)
ImageView messageBottomAppBar; ImageView option3BottomAppBar;
@BindView(R.id.profile_bottom_app_bar_main_activity) @BindView(R.id.option_4_bottom_app_bar_main_activity)
ImageView profileBottomAppBar; ImageView option4BottomAppBar;
@BindView(R.id.fab_main_activity) @BindView(R.id.fab_main_activity)
FloatingActionButton fab; FloatingActionButton fab;
SubscribedSubredditViewModel subscribedSubredditViewModel; SubscribedSubredditViewModel subscribedSubredditViewModel;
@ -180,6 +180,9 @@ public class MainActivity extends BaseActivity implements SortTypeSelectionCallb
@Named("nsfw_and_spoiler") @Named("nsfw_and_spoiler")
SharedPreferences mNsfwAndSpoilerSharedPreferences; SharedPreferences mNsfwAndSpoilerSharedPreferences;
@Inject @Inject
@Named("bottom_app_bar")
SharedPreferences bottomAppBarSharedPreference;
@Inject
CustomThemeWrapper mCustomThemeWrapper; CustomThemeWrapper mCustomThemeWrapper;
private FragmentManager fragmentManager; private FragmentManager fragmentManager;
private SectionsPagerAdapter sectionsPagerAdapter; private SectionsPagerAdapter sectionsPagerAdapter;
@ -329,14 +332,14 @@ public class MainActivity extends BaseActivity implements SortTypeSelectionCallb
drawer.setBackgroundColor(backgroundColor); drawer.setBackgroundColor(backgroundColor);
drawer.setStatusBarBackgroundColor(mCustomThemeWrapper.getColorPrimaryDark()); drawer.setStatusBarBackgroundColor(mCustomThemeWrapper.getColorPrimaryDark());
int bottomAppBarIconColor = mCustomThemeWrapper.getBottomAppBarIconColor(); int bottomAppBarIconColor = mCustomThemeWrapper.getBottomAppBarIconColor();
subscriptionsBottomAppBar.setColorFilter(bottomAppBarIconColor, android.graphics.PorterDuff.Mode.SRC_IN); option1BottomAppBar.setColorFilter(bottomAppBarIconColor, android.graphics.PorterDuff.Mode.SRC_IN);
multiRedditBottomAppBar.setColorFilter(bottomAppBarIconColor, android.graphics.PorterDuff.Mode.SRC_IN); option2BottomAppBar.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);
navigationView.setBackgroundColor(backgroundColor); navigationView.setBackgroundColor(backgroundColor);
applyAppBarLayoutAndToolbarTheme(appBarLayout, toolbar); applyAppBarLayoutAndToolbarTheme(appBarLayout, toolbar);
applyTabLayoutTheme(tabLayout); applyTabLayoutTheme(tabLayout);
bottomNavigationView.setBackgroundTint(ColorStateList.valueOf(mCustomThemeWrapper.getBottomAppBarBackgroundColor())); bottomAppBar.setBackgroundTint(ColorStateList.valueOf(mCustomThemeWrapper.getBottomAppBarBackgroundColor()));
applyFABTheme(fab); applyFABTheme(fab);
} }
@ -443,37 +446,83 @@ public class MainActivity extends BaseActivity implements SortTypeSelectionCallb
}).execute(); }).execute();
} }
private void bottomAppBarOptionAction(int option) {
switch (option) {
case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_SUBSCRIPTIONS: {
Intent intent = new Intent(MainActivity.this, SubscribedThingListingActivity.class);
startActivity(intent);
break;
}
case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_MULTIREDDITS: {
Intent intent = new Intent(MainActivity.this, SubscribedThingListingActivity.class);
intent.putExtra(SubscribedThingListingActivity.EXTRA_SHOW_MULTIREDDITS, true);
startActivity(intent);
break;
}
case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_INBOX: {
Intent intent = new Intent(this, InboxActivity.class);
startActivity(intent);
break;
}
case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_PROFILE: {
Intent intent = new Intent(this, ViewUserDetailActivity.class);
intent.putExtra(ViewUserDetailActivity.EXTRA_USER_NAME_KEY, mAccountName);
startActivity(intent);
break;
}
}
}
private int getBottomAppBarOptionDrawableResource(int option) {
switch (option) {
case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_SUBSCRIPTIONS:
return R.drawable.ic_subscritptions_bottom_app_bar_24dp;
case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_MULTIREDDITS:
return R.drawable.ic_multi_reddit_24dp;
case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_INBOX:
return R.drawable.ic_inbox_24dp;
default:
return R.drawable.ic_account_circle_24dp;
}
}
private void bindView() { private void bindView() {
if (isDestroyed()) { if (isDestroyed()) {
return; return;
} }
if (mAccessToken == null) { if (mAccessToken == null) {
bottomNavigationView.setVisibility(View.GONE); bottomAppBar.setVisibility(View.GONE);
fab.setVisibility(View.GONE); fab.setVisibility(View.GONE);
} else { } else {
if (showBottomAppBar) { if (showBottomAppBar) {
bottomNavigationView.setVisibility(View.VISIBLE); int optionCount = bottomAppBarSharedPreference.getInt(SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_COUNT, 4);
subscriptionsBottomAppBar.setOnClickListener(view -> { int option1 = bottomAppBarSharedPreference.getInt(SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_1, SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_SUBSCRIPTIONS);
Intent intent = new Intent(MainActivity.this, SubscribedThingListingActivity.class); int option2 = bottomAppBarSharedPreference.getInt(SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_2, SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_MULTIREDDITS);
startActivity(intent); int option3 = bottomAppBarSharedPreference.getInt(SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_3, SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_INBOX);
int option4 = bottomAppBarSharedPreference.getInt(SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_4, SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_PROFILE);
bottomAppBar.setVisibility(View.VISIBLE);
option1BottomAppBar.setImageResource(getBottomAppBarOptionDrawableResource(option1));
option2BottomAppBar.setImageResource(getBottomAppBarOptionDrawableResource(option2));
option3BottomAppBar.setImageResource(getBottomAppBarOptionDrawableResource(option3));
option4BottomAppBar.setImageResource(getBottomAppBarOptionDrawableResource(option4));
option1BottomAppBar.setOnClickListener(view -> {
bottomAppBarOptionAction(option1);
}); });
multiRedditBottomAppBar.setOnClickListener(view -> { option2BottomAppBar.setOnClickListener(view -> {
Intent intent = new Intent(MainActivity.this, SubscribedThingListingActivity.class); bottomAppBarOptionAction(option2);
intent.putExtra(SubscribedThingListingActivity.EXTRA_SHOW_MULTIREDDITS, true);
startActivity(intent);
}); });
messageBottomAppBar.setOnClickListener(view -> { option3BottomAppBar.setOnClickListener(view -> {
Intent intent = new Intent(this, InboxActivity.class); bottomAppBarOptionAction(option3);
startActivity(intent);
}); });
profileBottomAppBar.setOnClickListener(view -> { option4BottomAppBar.setOnClickListener(view -> {
Intent intent = new Intent(this, ViewUserDetailActivity.class); bottomAppBarOptionAction(option4);
intent.putExtra(ViewUserDetailActivity.EXTRA_USER_NAME_KEY, mAccountName);
startActivity(intent);
}); });
} else { } else {
CoordinatorLayout.LayoutParams lp = (CoordinatorLayout.LayoutParams) fab.getLayoutParams(); CoordinatorLayout.LayoutParams lp = (CoordinatorLayout.LayoutParams) fab.getLayoutParams();
@ -482,7 +531,50 @@ public class MainActivity extends BaseActivity implements SortTypeSelectionCallb
fab.setLayoutParams(lp); fab.setLayoutParams(lp);
} }
fab.setOnClickListener(view -> postTypeBottomSheetFragment.show(getSupportFragmentManager(), postTypeBottomSheetFragment.getTag())); int fabOption = bottomAppBarSharedPreference.getInt(SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_FAB, SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_FAB_SUBMIT_POSTS);
switch (fabOption) {
case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_FAB_REFRESH:
fab.setImageResource(R.drawable.ic_refresh_black_24dp);
break;
case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_FAB_CHANGE_SORT_TYPE:
fab.setImageResource(R.drawable.ic_sort_toolbar_24dp);
break;
case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_FAB_CHANGE_POST_LAYOUT:
fab.setImageResource(R.drawable.ic_post_layout_black_24dp);
break;
case SharedPreferencesUtils.MAIN_ACTIVITY_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.MAIN_ACTIVITY_BOTTOM_APP_BAR_FAB_REFRESH: {
if (sectionsPagerAdapter != null) {
sectionsPagerAdapter.refresh();
}
break;
}
case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_FAB_CHANGE_SORT_TYPE: {
changeSortType();
break;
}
case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_FAB_CHANGE_POST_LAYOUT: {
postLayoutBottomSheetFragment.show(getSupportFragmentManager(), postLayoutBottomSheetFragment.getTag());
break;
}
case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_FAB_SEARCH: {
Intent intent = new Intent(this, SearchActivity.class);
startActivity(intent);
break;
}
default:
postTypeBottomSheetFragment.show(getSupportFragmentManager(), postTypeBottomSheetFragment.getTag());
break;
}
});
fab.setVisibility(View.VISIBLE); fab.setVisibility(View.VISIBLE);
} }
@ -658,7 +750,7 @@ public class MainActivity extends BaseActivity implements SortTypeSelectionCallb
public void onPageSelected(int position) { public void onPageSelected(int position) {
if (mAccessToken != null) { if (mAccessToken != null) {
if (showBottomAppBar) { if (showBottomAppBar) {
bottomNavigationView.performShow(); bottomAppBar.performShow();
} }
fab.show(); fab.show();
} }
@ -796,14 +888,7 @@ public class MainActivity extends BaseActivity implements SortTypeSelectionCallb
return true; return true;
} }
@Override private void changeSortType() {
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
switch (item.getItemId()) {
case R.id.action_search_main_activity:
Intent intent = new Intent(this, SearchActivity.class);
startActivity(intent);
return true;
case R.id.action_sort_main_activity:
int currentPostType = sectionsPagerAdapter.getCurrentPostType(); int currentPostType = sectionsPagerAdapter.getCurrentPostType();
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
if (currentPostType != PostDataSource.TYPE_FRONT_PAGE) { if (currentPostType != PostDataSource.TYPE_FRONT_PAGE) {
@ -813,6 +898,17 @@ public class MainActivity extends BaseActivity implements SortTypeSelectionCallb
} }
sortTypeBottomSheetFragment.setArguments(bundle); sortTypeBottomSheetFragment.setArguments(bundle);
sortTypeBottomSheetFragment.show(getSupportFragmentManager(), sortTypeBottomSheetFragment.getTag()); sortTypeBottomSheetFragment.show(getSupportFragmentManager(), sortTypeBottomSheetFragment.getTag());
}
@Override
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
switch (item.getItemId()) {
case R.id.action_search_main_activity:
Intent intent = new Intent(this, SearchActivity.class);
startActivity(intent);
return true;
case R.id.action_sort_main_activity:
changeSortType();
return true; return true;
case R.id.action_refresh_main_activity: case R.id.action_refresh_main_activity:
if (mMenu != null) { if (mMenu != null) {
@ -939,7 +1035,7 @@ public class MainActivity extends BaseActivity implements SortTypeSelectionCallb
public void postScrollUp() { public void postScrollUp() {
if (mAccessToken != null) { if (mAccessToken != null) {
if (showBottomAppBar && !mLockBottomAppBar) { if (showBottomAppBar && !mLockBottomAppBar) {
bottomNavigationView.performShow(); bottomAppBar.performShow();
} }
if (!(showBottomAppBar && mLockBottomAppBar)) { if (!(showBottomAppBar && mLockBottomAppBar)) {
fab.show(); fab.show();
@ -953,7 +1049,7 @@ public class MainActivity extends BaseActivity implements SortTypeSelectionCallb
fab.hide(); fab.hide();
} }
if (showBottomAppBar && !mLockBottomAppBar) { if (showBottomAppBar && !mLockBottomAppBar) {
bottomNavigationView.performHide(); bottomAppBar.performHide();
} }
} }
} }

View File

@ -164,6 +164,15 @@ 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_MULTIREDDITS = 1;
public static final int MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_INBOX = 2;
public static final int MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_PROFILE = 3;
public static final int MAIN_ACTIVITY_BOTTOM_APP_BAR_FAB_SUBMIT_POSTS = 0;
public static final int MAIN_ACTIVITY_BOTTOM_APP_BAR_FAB_REFRESH = 1;
public static final int MAIN_ACTIVITY_BOTTOM_APP_BAR_FAB_CHANGE_SORT_TYPE = 2;
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 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";

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M3,5v14h19L22,5L3,5zM5,7h15v4L5,11L5,7zM5,17v-4h4v4L5,17zM11,17v-4h9v4h-9z"
android:fillColor="#000000"/>
</vector>

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M17.65,6.35C16.2,4.9 14.21,4 12,4c-4.42,0 -7.99,3.58 -7.99,8s3.57,8 7.99,8c3.73,0 6.84,-2.55 7.73,-6h-2.08c-0.82,2.33 -3.04,4 -5.65,4 -3.31,0 -6,-2.69 -6,-6s2.69,-6 6,-6c1.66,0 3.14,0.69 4.22,1.78L13,11h7V4l-2.35,2.35z"
android:fillColor="#000000"/>
</vector>

View File

@ -64,7 +64,7 @@
app:layout_behavior="@string/appbar_scrolling_view_behavior" /> 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_main_activity" android:id="@+id/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:layout_gravity="bottom" android:layout_gravity="bottom"
@ -78,25 +78,23 @@
android:weightSum="5"> android:weightSum="5">
<ImageView <ImageView
android:id="@+id/subscriptions_bottom_app_bar_main_activity" android:id="@+id/option_1_bottom_app_bar_main_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"
android:gravity="center" android:gravity="center"
android:paddingTop="8dp" android:paddingTop="8dp"
android:paddingBottom="8dp" android:paddingBottom="8dp"
android:src="@drawable/ic_subscritptions_bottom_app_bar_24dp"
android:background="?attr/selectableItemBackgroundBorderless" /> android:background="?attr/selectableItemBackgroundBorderless" />
<ImageView <ImageView
android:id="@+id/multi_reddit_bottom_app_bar_main_activity" android:id="@+id/option_2_bottom_app_bar_main_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"
android:gravity="center" android:gravity="center"
android:paddingTop="8dp" android:paddingTop="8dp"
android:paddingBottom="8dp" android:paddingBottom="8dp"
android:src="@drawable/ic_multi_reddit_24dp"
android:background="?attr/selectableItemBackgroundBorderless" /> android:background="?attr/selectableItemBackgroundBorderless" />
<TextView <TextView
@ -106,18 +104,17 @@
android:background="@android:color/transparent"/> android:background="@android:color/transparent"/>
<ImageView <ImageView
android:id="@+id/message_bottom_app_bar_main_activity" android:id="@+id/option_3_bottom_app_bar_main_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"
android:gravity="center" android:gravity="center"
android:paddingTop="8dp" android:paddingTop="8dp"
android:paddingBottom="8dp" android:paddingBottom="8dp"
android:src="@drawable/ic_inbox_24dp"
android:background="?attr/selectableItemBackgroundBorderless" /> android:background="?attr/selectableItemBackgroundBorderless" />
<ImageView <ImageView
android:id="@+id/profile_bottom_app_bar_main_activity" android:id="@+id/option_4_bottom_app_bar_main_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"
@ -125,7 +122,6 @@
android:paddingTop="8dp" android:paddingTop="8dp"
android:paddingBottom="8dp" android:paddingBottom="8dp"
android:gravity="center" android:gravity="center"
android:src="@drawable/ic_account_circle_24dp"
android:background="?attr/selectableItemBackgroundBorderless" /> android:background="?attr/selectableItemBackgroundBorderless" />
</LinearLayout> </LinearLayout>
@ -137,8 +133,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="@dimen/fab_margin" android:layout_margin="@dimen/fab_margin"
android:visibility="gone" android:visibility="gone"
app:srcCompat="@drawable/ic_add_day_night_24dp"
app:tint="@android:color/white" app:tint="@android:color/white"
app:layout_anchor="@id/bottom_navigation_main_activity" /> app:layout_anchor="@id/bottom_app_bar_main_activity" />
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>