本人纯是个菜鸟,做了一个布局 类似网易截图,上面是一个gallery 下面是一个自定义Listview 我的原意就是Gallery和 Listview一起上下滑动。但是我的只能实现Listview滑动~~~下面是我的代码,希望大侠们能帮忙看一下,感激不尽!!!!!
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:orientation="vertical"
android:layout_height="wrap_content"> <Gallery xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/gallery" android:layout_width="match_parent"
android:layout_height="wrap_content" android:background="@drawable/listviewbackground" /> <ListView android:id="@+id/main_listView"
android:layout_height="wrap_content" android:layout_width="match_parent"
android:clickable="true" />
<!-- android:groupIndicator="@null" android:clickable="true" <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical"
android:layout_width="fill_parent" android:layout_height="fill_parent" android:id="@+id/layout"> --></LinearLayout>
复制代码
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:orientation="vertical"
android:layout_height="wrap_content"> <Gallery xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/gallery" android:layout_width="match_parent"
android:layout_height="wrap_content" android:background="@drawable/listviewbackground" /> <ListView android:id="@+id/main_listView"
android:layout_height="wrap_content" android:layout_width="match_parent"
android:clickable="true" />
<!-- android:groupIndicator="@null" android:clickable="true" <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical"
android:layout_width="fill_parent" android:layout_height="fill_parent" android:id="@+id/layout"> --></LinearLayout>
复制代码
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货