Android: MainActivity now contains a tab switcher separating games by platform.

This commit is contained in:
sigmabeta authored and Eder Bastos committed 2015-06-23 21:54:09 -04:00
1 parent 8b5b83c29a
commit 6b24b604e5
7 files changed
+326 -43

No files matched your search

@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/coordinator_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
@@ -10,7 +9,7 @@
<android.support.design.widget.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="@dimen/main_appbar_height"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
<android.support.v7.widget.Toolbar
@@ -20,25 +19,31 @@
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
app:layout_scrollFlags="scroll|enterAlways"/>
<android.support.design.widget.TabLayout
android:id="@+id/tabs_platforms"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabTextAppearance="@style/MyCustomTextAppearance"
app:tabMode="fixed"
app:tabGravity="fill"/>
</android.support.design.widget.AppBarLayout>
<android.support.v7.widget.RecyclerView
android:id="@+id/grid_games"
<android.support.v4.view.ViewPager
android:id="@+id/pager_platforms"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:listitem="@layout/grid_card_game"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
<android.support.design.widget.FloatingActionButton
android:id="@+id/button_add_directory"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_margin="16dp"
android:layout_margin="32dp"
android:src="@drawable/ic_add"
app:borderWidth="0dp"
app:rippleColor="?android:colorPrimaryDark"
app:layout_anchor="@+id/grid_games"
app:layout_anchor="@+id/pager_platforms"
app:layout_anchorGravity="bottom|right|end"/>
</android.support.design.widget.CoordinatorLayout>
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<android.support.v7.widget.RecyclerView
android:id="@+id/grid_games"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
tools:listitem="@layout/grid_card_game"/>
</FrameLayout>