头疼的布局管理器

gaodengjie 2014-03-28 04:39:48
需求:像网易新闻客户端一样。导航下面是几张图片轮播接下来是新闻列表。往上拉的时候是整屏滚动就是图片和新闻列表一起滚动(不只是新闻列表滚动)。往下拉的时候更新。
下面是布局代码,运行不对。

<LinearLayout 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:orientation="vertical" >
<com.example.widget.PullDownListView
android:id="@+id/sreach_list"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="150dp" >
<android.support.v4.view.ViewPager
android:id="@+id/viewpager"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
</android.support.v4.view.ViewPager>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:background="#33000000"
android:gravity="center"
android:orientation="vertical"
android:paddingBottom="5dp"
android:paddingTop="5dp" >
<TextView
android:id="@+id/article_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:textColor="#ffffff" />
<LinearLayout
android:id="@+id/custom_space"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal"
android:paddingBottom="2.5dp"
android:paddingTop="2.5dp" >
</LinearLayout>
</LinearLayout>
</RelativeLayout>
<ListView
android:id="@+id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="0.0"
android:divider="@null"
android:drawSelectorOnTop="false"
android:fadingEdgeLength="0.0sp" />
</com.example.widget.PullDownListView>

</LinearLayout>

应该如何来改,其实我找到一个图片轮播的DEMO+一个下拉刷新的DEMO来拼装。但是不行,求解。或者那里有这样的例子发个源码或者地址学习。谢谢了。
...全文
138 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
建议将效果一个一个高明白了再来做合并修改会轻松些
gaodengjie 2014-03-31
  • 打赏
  • 举报
回复
引用 3 楼 cclovescw 的回复:
你说的这个网易新闻的效果,确实需要很多自定义的东西。除了图片轮播、下拉刷新、底部更多加载以外,还有左右手势滑动的切换。网上找很多demo来一点点拼凑吧。
----- 呵呵,我就是找demo来拼揍的,但是实际上运行起来布局管理器都不知道怎么调整。
绝世酱油瓶 2014-03-31
  • 打赏
  • 举报
回复
图片轮播方式很多,slidingmenu可以做抽屉菜单效果,下拉刷新 以及底部加载更多的 XListview 这个比较简单好用
  • 打赏
  • 举报
回复
你说的这个网易新闻的效果,确实需要很多自定义的东西。除了图片轮播、下拉刷新、底部更多加载以外,还有左右手势滑动的切换。网上找很多demo来一点点拼凑吧。
gaodengjie 2014-03-31
  • 打赏
  • 举报
回复
那里有全面的布局管理器学习?
哎,真难 2014-03-28
  • 打赏
  • 举报
回复
这不是简单布局能实现的,这都是自定义view实现的,,,

80,352

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧