0
フレームのレイアウトの中にマップフラグメントがあります。その上に別のコンテナ(例:相対レイアウト)を使用するとドラッグしないようにしたいのですが、シークバーといくつかのtextViewsを含んでいます。アンドロイドが画面上の地図の一部をドラッグするのを防ぐ
私は誤って私のコンテナ内の項目ではなく、その中の項目に触れたときにドラッグをマップしたくありません。これを行う方法はありますか?画面上のその部分を無効にするにはどうすればいいですか?
私のレイアウト例:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:map="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/maps_fragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<fragment
android:id="@+id/map"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.app.activity.MapsActivity"></fragment>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="bottom">
<com.example.app.ui.views.CustomRelativeLayoutContainer
android:id="@+id/mainMapSlider"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentStart="true"
android:layout_gravity="bottom"
android:layout_marginBottom="20dp"></com.example.app.ui.views.CustomRelativeLayoutContainer>
<ImageView
android:id="@+id/addSeekBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="22dp"
map:srcCompat="@mipmap/ic_history" />
</RelativeLayout>
</FrameLayout>
おかげで、うまく動作します! – Konrad