【问题标题】:Android Play Newsstand Layout DesignAndroid Play 报亭版面设计
【发布时间】:2014-11-26 03:28:09
【问题描述】:

所以,我正在尝试重新创建一个与此类似的视图。

到目前为止,我的想法是创建一个带有按钮的可滑动视图。但是,我似乎无法创建他们为 Google Play 制作的可滑动视图。它基本上就像一个标签。我似乎无法弄清楚如何在没有 ActionBar Tab 的情况下使用 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>

为了防止关闭(由于广泛性),我想我会指定我想知道上面显示的选项卡样式所需的视图元素

【问题讨论】:

  • 这是问题所在,我们发现了一些很棒的东西,但不知道如何制作它:/

标签: android xml


【解决方案1】:

AppCompat v21 — 棒棒糖前设备的材料设计

【讨论】:

    【解决方案2】:

    最容易把它分成单独的块。

    1) 首先是选项卡,使用 Material 您可以在这里查看这篇文章:android 5.0 material design tabs

    2) 其次是带有视差的垂直滚动。我会使用类似的东西:https://github.com/kanytu/android-parallax-recyclerview

    3) 最后一部分是让工具栏根据滚动方向消失和重新出现。我会把它留给你允许的谷歌图书馆或要点。 :)

    --编辑--

    我屈服了。这是我见过的一个不错的使用 Observable 滚动视图的视图:https://github.com/ksoichiro/Android-ObservableScrollView

    【讨论】:

      【解决方案3】:

      我不能 100% 确定这是否是他们使用的,但也许您正在寻找 PagerTitleStrip

      【讨论】:

        【解决方案4】:

        看看:MaterialViewPager 肯定。对于此类应用程序,这是最有用的库。

        这对我帮助很大。

        你可以看到Examples also

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 2016-11-23
          • 2013-12-30
          • 1970-01-01
          • 1970-01-01
          • 2015-10-02
          • 2011-08-25
          • 1970-01-01
          相关资源
          最近更新 更多