3

Play Newstand

So, I'm trying to recreate a view that's similar to this.

My idea so far is to create a swipeable view with buttons. However I can't seem to create this swipeable view they've made for Google Play. Its basically like a tab. I can't seem to figure out how to do a Tab without ActionBar Tab.

<LinearLayout android:orientation="horizontal"
     android:layout_width="match_parent"
     android:layout_height="0dip"
     android:layout_weight="0.5">
        <Button
            android:id="@+id/radio_button2"
            android:layout_marginTop="2.0dip"
            android:layout_width="0dp"
            android:layout_height="40dp"
            android:background="#fff"
            android:textColor="#3e82ff"
            android:layout_weight="1"
            android:text="Description" />

        <Button
            android:id="@+id/radio_button3"
            android:layout_marginTop="2.0dip"
            android:layout_height="40dp"
            android:layout_width="0dp"
            android:background="#fff"
            android:textColor="#3e82ff"
           android:layout_weight="1"
            android:text="Comments" />

</LinearLayout>

To prevent closures (due to broadness) I thought I'd specify I want to know the view element required to the tab style shown above

cjds
  • 8,268
  • 10
  • 49
  • 84

4 Answers4

2

AppCompat v21 — Material Design for Pre-Lollipop Devices

Hopewell Mutanda
  • 1,035
  • 3
  • 11
  • 18
2

Its easiest to think of it in separate chunks.

1) First is the tabs, and with Material you'll want to look at this post here: android 5.0 material design tabs

2) Second is the vertical scroll with parallax. And I would use something similar to this: https://github.com/kanytu/android-parallax-recyclerview

3) Final portion would be to make the toolbar disappear and reappear based on scroll direction. I'll leave it up to you to google libraries or gists that allow that. :)

--edit--

I caved. Here's a decent one I've seen that uses an Observable scroll view: https://github.com/ksoichiro/Android-ObservableScrollView

Community
  • 1
  • 1
John Shelley
  • 2,655
  • 3
  • 27
  • 36
1

I'm not 100% sure if this is what they used, but perhaps you are looking for PagerTitleStrip.

JstnPwll
  • 8,585
  • 2
  • 33
  • 56
0

Have a look : MaterialViewPager for sure. This is best useful library for this type of application.

It helps me a lot.

You can see Examples also.

Pratik Butani
  • 60,504
  • 58
  • 273
  • 437