-1
A
回答
0
要滚动型需要一个直接的孩子,并把整个代码在布局
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:whatever="http://schemas.android.com/apk/res-auto"
android:layout_width="fill_parent"
android:layout_height="match_parent" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray_bg" >
<LinearLayout
android:id="@+id/ll_banner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/common_padding"
android:layout_marginLeft="@dimen/common_padding"
android:layout_marginRight="@dimen/common_padding"
android:layout_marginTop="@dimen/common_padding" >
<com.amobee.adsdk.AmobeeAdPlaceholder
android:id="@+id/findCinemaPlaceHolder"
android:layout_width="match_parent"
android:layout_height="@dimen/ads_amobee_height" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_map"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_below="@+id/ll_banner"
android:layout_marginTop="0dp" >
<FrameLayout
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
class="com.google.android.gms.maps.MapFragment" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="@+id/ll_banner"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="20dp"
android:background="@android:color/transparent"
android:orientation="vertical" >
<ImageButton
android:id="@+id/close_map"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/cinemas_close_button_normal"
android:clickable="true" />
</LinearLayout>
<RelativeLayout
android:id="@+id/rl_location"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_margin="10dp"
android:background="@android:color/white"
android:visibility="gone" >
<com.handmark.pulltorefresh.library.PullToRefreshScrollView
xmlns:ptr="http://schemas.android.com/apk/res-auto"
android:id="@+id/pullToRefresh"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_margin="@dimen/common_padding"
android:visibility="visible"
ptr:ptrAnimationStyle="flip"
ptr:ptrMode="pullFromStart" >
<LinearLayout
android:id="@+id/llCinema"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_margin="10dp"
android:orientation="vertical" >
<TextView
android:id="@+id/tvNearByCinemas"
style="@style/GrayNormalTextView"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="NEARBY CINEMAS" />
<ListView
android:id="@+id/list_location"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:visibility="gone" />
<LinearLayout
android:id="@+id/lLCinemaList"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
</LinearLayout>
<ProgressBar
android:id="@+id/pbLoadMoreData"
style="?android:attr/progressBarStyle"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_gravity="center"
android:layout_marginBottom="@dimen/common_padding"
android:visibility="gone" />
</LinearLayout>
</com.handmark.pulltorefresh.library.PullToRefreshScrollView>
<TextView
android:id="@+id/tv_msg"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginTop="20dp" />
</RelativeLayout>
</RelativeLayout>
0
把里面的滚动型代码,这一切,就像Sandeep的回答很简单。
0
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
<RelativeLayout
xmlns:tools="http://schemas.android.com/tools"
xmlns:whatever="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray_bg" >
<LinearLayout
android:id="@+id/ll_banner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/common_padding"
android:layout_marginLeft="@dimen/common_padding"
android:layout_marginRight="@dimen/common_padding"
android:layout_marginTop="@dimen/common_padding" >
<!--
<ImageView android:id="@+id/img_top_banner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/cinemas_location_banner"
/>
-->
<com.amobee.adsdk.AmobeeAdPlaceholder
android:id="@+id/findCinemaPlaceHolder"
android:layout_width="match_parent"
android:layout_height="@dimen/ads_amobee_height" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_map"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_below="@+id/ll_banner"
android:layout_marginTop="0dp" >
<FrameLayout
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
class="com.google.android.gms.maps.MapFragment" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="@+id/ll_banner"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="20dp"
android:background="@android:color/transparent"
android:orientation="vertical" >
<ImageButton
android:id="@+id/close_map"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/cinemas_close_button_normal"
android:clickable="true" />
</LinearLayout>
<RelativeLayout
android:id="@+id/rl_location"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_margin="10dp"
android:background="@android:color/white"
android:visibility="gone" >
<com.handmark.pulltorefresh.library.PullToRefreshScrollView
xmlns:ptr="http://schemas.android.com/apk/res-auto"
android:id="@+id/pullToRefresh"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_margin="@dimen/common_padding"
android:visibility="visible"
ptr:ptrAnimationStyle="flip"
ptr:ptrMode="pullFromStart" >
<LinearLayout
android:id="@+id/llCinema"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_margin="10dp"
android:orientation="vertical" >
<TextView
android:id="@+id/tvNearByCinemas"
style="@style/GrayNormalTextView"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="NEARBY CINEMAS" />
<ListView
android:id="@+id/list_location"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:visibility="gone" />
<LinearLayout
android:id="@+id/lLCinemaList"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
</LinearLayout>
<ProgressBar
android:id="@+id/pbLoadMoreData"
style="?android:attr/progressBarStyle"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_gravity="center"
android:layout_marginBottom="@dimen/common_padding"
android:visibility="gone" />
</LinearLayout>
</com.handmark.pulltorefresh.library.PullToRefreshScrollView>
<TextView
android:id="@+id/tv_msg"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginTop="20dp" />
</RelativeLayout>
<!--
<com.insing.insingmoviesapp.custom.SlidingUpPanelLayout
xmlns:sothree="http://schemas.android.com/apk/res-auto"
android:id="@+id/sliding_layout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_margin="10dp"
android:gravity="bottom"
sothree:dragView="@+id/dragView"
sothree:panelHeight="68dp"
sothree:paralaxOffset="100dp"
sothree:shadowHeight="4dp"
android:layout_below="@+id/ll_banner"
android:visibility="gone">
MAIN CONTENT
<View
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:visibility="gone" />
SLIDING LAYOUT
<RelativeLayout
android:id="@+id/rl_location2"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:background="@android:color/white" >
<ListView
android:id="@+id/list_location"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_margin="10dp" >
</ListView>
<com.handmark.pulltorefresh.library.PullToRefreshScrollView
xmlns:ptr="http://schemas.android.com/apk/res-auto"
android:id="@+id/pullToRefresh2"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_margin="@dimen/common_padding"
android:visibility="visible"
ptr:ptrAnimationStyle="flip"
ptr:ptrMode="pullFromStart" >
<LinearLayout
android:id="@+id/llCinema"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_margin="10dp"
android:orientation="vertical" >
<TextView
android:id="@+id/tvNearByCinemas"
style="@style/GrayNormalTextView"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="NEARBY CINEMAS" />
<ListView
android:id="@+id/list_location"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:visibility="gone"/>
<LinearLayout
android:id="@+id/lLCinemaList"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
</LinearLayout>
</LinearLayout>
</com.handmark.pulltorefresh.library.PullToRefreshScrollView>
<TextView
android:id="@+id/tv_msg"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginTop="20dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
/>
</RelativeLayout>
</com.insing.insingmoviesapp.custom.SlidingUpPanelLayout>
-->
</RelativeLayout>
</ScrollView>
相关问题
- 1. 将滚动视图添加到布局
- 2. 如何在滚动视图中获取此布局?
- 3. 动态添加滚动视图在滚动视图中的布局和线性布局
- 4. 将视图添加到滚动视图的底部布局
- 5. 如何在视图下添加布局
- 6. 如何防止滚动视图向内容布局添加新视图
- 7. mono for android - 动态添加布局到滚动视图
- 8. 滚动视图在彼此顶部添加视图
- 9. 在视图中添加布局
- 10. Android的滚动视图吃了添加布局
- 11. 添加视图布局底部的滚动型
- 12. 无法滚动视图添加到布局
- 13. ViewPager添加滚动视图到布局后不工作
- 14. android textview scrollview在布局滚动视图
- 15. 如何滚动到长滚动视图布局的顶部?
- 16. 如何在添加视图(自动布局)后调整uiscrollview
- 17. 滚动视图滚动列表视图不是布局
- 18. 如何在Qt中为水平布局添加滚动区域?
- 19. 的Xcode - 滚动视图 - 自动布局
- 20. 以编程方式添加视图(线性)布局(即滚动视图内)
- 21. 添加滚动视图将整个布局推到一半视图大小?
- 22. 如何创建此Android视图/布局
- 23. 如何创建此视图(布局)
- 24. 如何布局添加到此
- 25. 滚动查看不滚动子视图在自动布局
- 26. 如何添加滚动视图
- 27. 如何在另一视图中使用布局添加inflatter
- 28. 如何在特定布局中添加新视图?
- 29. 如何在运行时自定义布局中添加视图
- 30. 设置水平滚动视图布局
很难在另一个选项卡中打开,你可以在这里发布代码吗? – sandeepmaaram 2015-01-25 15:39:18