Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2012 from mvanbeusekom/feature/fix_androidsupport…
…_toolbar_layout The `AppBarLayout` should be direct child of the `CoordinatedLayout`
- Loading branch information
Showing
3 changed files
with
63 additions
and
71 deletions.
There are no files selected for viewing
66 changes: 32 additions & 34 deletions
66
.../Android-Support/Fragments/Example.Droid/Resources/layout/fragment_example_viewpager.axml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,34 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:local="http://schemas.android.com/apk/res-auto" | ||
android:id="@+id/main_content" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
<LinearLayout android:orientation="vertical" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
<android.support.design.widget.AppBarLayout | ||
android:id="@+id/appbar" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"> | ||
<android.support.v7.widget.Toolbar | ||
android:id="@+id/toolbar" | ||
android:layout_width="match_parent" | ||
android:layout_height="?attr/actionBarSize" | ||
android:background="?attr/colorPrimary" | ||
local:popupTheme="@style/ThemeOverlay.AppCompat.Light" | ||
local:layout_scrollFlags="scroll|enterAlways" /> | ||
<android.support.design.widget.TabLayout | ||
android:id="@+id/tabs" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:paddingLeft="16dp" | ||
local:tabGravity="center" | ||
local:tabMode="scrollable" /> | ||
</android.support.design.widget.AppBarLayout> | ||
<android.support.v4.view.ViewPager | ||
android:id="@+id/viewpager" | ||
android:layout_width="match_parent" | ||
android:layout_height="fill_parent" | ||
local:layout_behavior="@string/appbar_scrolling_view_behavior" /> | ||
</LinearLayout> | ||
<android.support.design.widget.CoordinatorLayout | ||
xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:local="http://schemas.android.com/apk/res-auto" | ||
android:id="@+id/main_content" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:orientation="vertical"> | ||
<android.support.design.widget.AppBarLayout | ||
android:id="@+id/appbar" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"> | ||
<android.support.v7.widget.Toolbar | ||
android:id="@+id/toolbar" | ||
android:layout_width="match_parent" | ||
android:layout_height="?attr/actionBarSize" | ||
android:background="?attr/colorPrimary" | ||
local:popupTheme="@style/ThemeOverlay.AppCompat.Light" | ||
local:layout_scrollFlags="scroll|enterAlways" /> | ||
<android.support.design.widget.TabLayout | ||
android:id="@+id/tabs" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:paddingLeft="16dp" | ||
local:tabGravity="center" | ||
local:tabMode="scrollable" /> | ||
</android.support.design.widget.AppBarLayout> | ||
<android.support.v4.view.ViewPager | ||
android:id="@+id/viewpager" | ||
android:layout_width="match_parent" | ||
android:layout_height="fill_parent" | ||
local:layout_behavior="@string/appbar_scrolling_view_behavior" /> | ||
</android.support.design.widget.CoordinatorLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 15 additions & 18 deletions
33
...ort/Fragments/Example.Droid/Resources/layout/fragment_recyclerview_multiitemtemplate.axml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,17 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:local="http://schemas.android.com/apk/res-auto" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
<LinearLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:orientation="vertical"> | ||
<include | ||
layout="@layout/toolbar_actionbar" /> | ||
<MvxRecyclerView | ||
android:id="@+id/my_recycler_view" | ||
android:scrollbars="vertical" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
local:MvxTemplateSelector="@string/recyclerview_multiitem_templateselector" | ||
local:MvxBind="ItemsSource Items; ItemClick ItemSelected" /> | ||
</LinearLayout> | ||
<android.support.design.widget.CoordinatorLayout | ||
xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:local="http://schemas.android.com/apk/res-auto" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:orientation="vertical"> | ||
<include | ||
layout="@layout/toolbar_actionbar" /> | ||
<MvxRecyclerView | ||
android:id="@+id/my_recycler_view" | ||
android:scrollbars="vertical" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
local:MvxTemplateSelector="@string/recyclerview_multiitem_templateselector" | ||
local:MvxBind="ItemsSource Items; ItemClick ItemSelected" /> | ||
</android.support.design.widget.CoordinatorLayout> |