如何在不影响地图Scrollview的情况下将ScrollView添加到布局?

时间:2017-12-19 15:41:39

标签: android android-layout

我想在不影响地图片段滚动的情况下将ScrollView添加到此布局。当我将ScrollView添加到父级时,地图不会滚动。

我想添加一个滚动来处理横向模式下的布局。我怎样才能做到这一点?

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:map="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<de.hdodenhof.circleimageview.CircleImageView
    android:id="@+id/ProfileFragment_image_profile"
    android:layout_width="match_parent"
    android:layout_height="96dp"
    android:layout_marginTop="@dimen/large_margin"
    android:src="@drawable/londonplcae"
    />
<TextView
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:gravity="center_horizontal"
    android:layout_marginTop="@dimen/medium_margin"
    android:textColor="@color/colorPrimary"
    android:textSize="@dimen/small_text_size"
    android:text="مكان التسليم"/>
<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="@dimen/tiny_margin"
    android:gravity="center"
    android:orientation="horizontal">
    <Button
        android:layout_marginRight="@dimen/medium_margin"
        android:layout_marginLeft="@dimen/medium_margin"
        android:background="@drawable/button_wait_until_review_shape"
        android:layout_width="wrap_content"
        android:text="تواصل"
        android:textSize="@dimen/small_text_size"
        android:textColor="@color/whiteColor"
        android:layout_height="30dp" />
    <Button
        android:layout_width="wrap_content"
        android:background="@drawable/button_addservice_shape"
        android:text="طلب الخدمة"
        android:textSize="@dimen/small_text_size"
        android:textColor="@color/whiteColor"
        android:layout_marginLeft="@dimen/medium_margin"
        android:layout_marginRight="@dimen/medium_margin"
        android:layout_height="30dp" />
</LinearLayout>
<TextView
    android:id="@+id/ProfileFragment_txt_emailAddress"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:gravity="center_horizontal"
    android:layout_marginTop="@dimen/tiny_margin"
    android:textSize="@dimen/small_text_size"
    android:textColor="@color/blackColor"
    android:text="hero@gmail.com"/>
<TextView
    android:id="@+id/ProfileFragment_txt_phoneNumber"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:gravity="center_horizontal"
    android:layout_marginTop="@dimen/tiny_margin"
    android:textSize="@dimen/small_text_size"
    android:textColor="@color/colorPrimary"
    android:text="012349394893"/>
<TextView
    android:id="@+id/ProfileFragment_txt_services"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:gravity="center_horizontal"
    android:layout_marginTop="@dimen/medium_margin"
    android:paddingRight="@dimen/large_margin"
    android:paddingLeft="@dimen/large_margin"
    android:textSize="@dimen/small_text_size"
    android:textColor="#739C4C"
    android:text="ثلاجات الطعام ، بوتجاز ، حافظات الطعام "/>
<TextView
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:gravity="center_horizontal"
    android:layout_marginTop="@dimen/tiny_margin"
    android:textSize="@dimen/small_text_size"
    android:textColor="@color/colorPrimary"
    android:text="موقع مكان التسليم"/>
<TextView
    android:id="@+id/ProfileFragment_txt_deliveryPlace"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:gravity="center_horizontal"
    android:layout_marginBottom="@dimen/tiny_margin"
    android:layout_marginTop="@dimen/tiny_margin"
    android:paddingRight="@dimen/large_margin"
    android:paddingLeft="@dimen/large_margin"
    android:textSize="@dimen/small_text_size"
    android:textColor="@color/blackColor"
    android:text="  المملكة العدبية السعوةية، الرياض ، حي الزهور "/>
<fragment
    android:name="com.google.android.gms.maps.SupportMapFragment"
    android:id="@+id/profileFragment_Map"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    map:cameraBearing="112.5"
    map:cameraTargetLat="-33.796923"
    map:cameraTargetLng="150.922433"
    map:cameraTilt="30"
    map:cameraZoom="13"
    map:mapType="normal"
    map:uiCompass="false"
    map:uiRotateGestures="true"
    map:uiScrollGestures="true"
    map:uiTiltGestures="true"
    map:uiZoomControls="true"
    map:uiZoomGestures="true"/>
  </LinearLayout>

0 个答案:

没有答案