android中首页的用户界面设计

时间:2014-12-18 15:10:56

标签: android android-ui

我需要在Android应用程序中进行一些用户界面设计,最有可能只用于头版。

对于示例:我需要像下面这样做。

enter image description here

我尝试将图像放置在布局中并为动作着色,但我没有得到完美的效果。如果我得到一些样本或Github帖子或其他一些对我有帮助的建议。

1 个答案:

答案 0 :(得分:4)

您可以尝试使用此库https://github.com/kmshack/Android-ParallaxHeaderViewPager

enter image description here

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">

<fr.castorflex.android.googleplusprofilepageapp.ParallaxImageView ... />

<LinearLayout ... >
    <TextView ... />
    <TextView ... />
    <TextView ... />
</LinearLayout>

<!-- we add one more container to facilitate the add/remove view -->
<FrameLayout android:id="@+id/tabs_container"
    android:layout_height="48dp"
    android:layout_width="match_parent"
    android:layout_below="@+id/informations_container">

  <HorizontalScrollView
      android:id="@+id/horizontalscrollview"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:scrollbars="none"
      >

      <LinearLayout
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:orientation="horizontal">

          <!-- tabs here -->

      </LinearLayout>
  </HorizontalScrollView>
</FrameLayout>

<ImageView ... />

</RelativeLayout>

enter image description here

检查this以获取更多信息

相关问题