Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Play Newsstand Layout Design

Tags:

android

xml

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

like image 698
cjds Avatar asked Jul 22 '26 12:07

cjds


2 Answers

AppCompat v21 — Material Design for Pre-Lollipop Devices

like image 175
Hopewell Mutanda Avatar answered Jul 25 '26 00:07

Hopewell Mutanda


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

like image 30
John Shelley Avatar answered Jul 25 '26 00:07

John Shelley



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!