Как добавить Scrollview в этот макет (http://www.mediafire.com/view/4iawa9rsn99f9l9/find_cinema_near_by_fragment.xml)?Как добавить Scrollview в этот макет?
-1
A
ответ
0
Чтобы Scrollview взять одного прямого ребенка и поместить весь код в этом макете
<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
Поместите свой код внутри ScrollView, что все очень просто, как ответ 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. Как получить этот макет в scrollview?
- 2. Как добавить пользовательский макет в линейный макет в scrollView dynamicaly
- 3. динамически добавить линейный макет в scrollview
- 4. Добавить TextView в макет внутри scrollView
- 5. Как добавить панель инструментов в этот макет?
- 6. Как добавить нижний колонтитул в этот макет?
- 7. Макет макета в scrollview
- 8. Добавление ScrollView в макет
- 9. Добавить отдельный xml-макет в этот макет xml
- 10. ScrollView не прокручивает макет?
- 11. Этот макет ScrollView или его родственник RelativeLayout бесполезен
- 12. Как построить этот макет в Swift
- 13. Как сделать этот макет прокрутки?
- 14. Как обернуть относительный макет в Scrollview?
- 15. Как установить scrollview в мой макет?
- 16. Как сделать этот макет в Android XML
- 17. mono for android - динамически добавить макет в scrollview
- 18. Как получить этот макет?
- 19. Как создать этот макет
- 20. Как реализовать этот макет
- 21. линейный макет вес внутри scrollview
- 22. Как получить этот макет?
- 23. Как выполнить этот макет?
- 24. Как создать этот макет?
- 25. Обертывание весь макет деятельности в ScrollView
- 26. Как добавить ViewController в scrollview
- 27. Как добавить макет в макет в android
- 28. Как разместить другой макет поверх Scrollview
- 29. ScrollView не прокручивает переполненный макет
- 30. Как добавить ScrollView в Android XML?
Трудно открыть на другой вкладке, можете ли вы отправить код здесь? – sandeepmaaram