I have set custom view inside callout view of map but it always resize to screen width while scrolling map.And also not able to set custom width to view. Please check the attach screenshot for reference.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="@dimen/_250sdp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:orientation="vertical">
<ImageView
android:id="@+id/ivCloseInfoWindow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_gravity="left"
android:padding="@dimen/_5sdp"
android:src="@drawable/gray_corss" />
<LinearLayout
android:gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="@dimen/_10sdp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/_20sdp"
android:layout_marginRight="@dimen/_20sdp"
android:orientation="vertical"
android:padding="@dimen/_10sdp">
<TextView
android:id="@+id/tvLakeName"
style="@style/FontBold"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="2"
android:text="Stick Marsh"
android:textColor="@color/black"
android:textSize="@dimen/_15sdp" />
<TextView
android:id="@+id/tvLakeAddress"
style="@style/FontMedium"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/_5sdp"
android:ellipsize="end"
android:maxLines="1"
android:text="Indian River Country, FL"
android:textColor="@color/gray_address"
android:textSize="@dimen/_12sdp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/_5sdp"
android:orientation="horizontal">
<ImageView
android:id="@+id/ivStar1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/star_rating" />
<ImageView
android:id="@+id/ivStar2"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_marginLeft="@dimen/_3sdp"
android:src="@drawable/star_rating" />
<ImageView
android:id="@+id/ivStar3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="@dimen/_3sdp"
android:src="@drawable/star_rating" />
<TextView
android:id="@+id/tvLakeCondition"
style="@style/FontSemiBold"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="@dimen/_5sdp"
android:ellipsize="end"
android:maxLines="1"
android:text="Poor Condition"
android:textColor="@color/orange"
android:textSize="@dimen/_10sdp" />
</LinearLayout>
</LinearLayout>
<View
android:layout_width="wrap_content"
android:layout_height="@dimen/_1sdp"
android:layout_marginLeft="@dimen/_15sdp"
android:layout_marginRight="@dimen/_15sdp"
android:layout_marginTop="@dimen/_5sdp"
android:background="@color/gray_label" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/_20sdp"
android:layout_marginRight="@dimen/_20sdp"
android:layout_marginTop="@dimen/_8sdp"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/tvSpicesCount"
style="@style/FontMedium"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="5"
android:textColor="@color/blue"
android:textSize="@dimen/_15sdp" />
<TextView
style="@style/FontMedium"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="@string/fish_spices"
android:textColor="@color/blue"
android:textSize="@dimen/_12sdp" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/_20sdp"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/tvFishingSpotsCount"
style="@style/FontMedium"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="5"
android:textColor="@color/blue"
android:textSize="@dimen/_15sdp" />
<TextView
style="@style/FontMedium"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="@string/fishing_spots"
android:textColor="@color/blue"
android:textSize="@dimen/_12sdp" />
</LinearLayout>
</LinearLayout>
<TextView
android:id="@+id/tvFishHere"
style="@style/FontBold"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/_20sdp"
android:layout_marginRight="@dimen/_20sdp"
android:layout_marginTop="@dimen/_5sdp"
android:background="@drawable/round_blue_solid"
android:gravity="center"
android:maxLines="1"
android:paddingBottom="@dimen/_10sdp"
android:paddingLeft="@dimen/_50sdp"
android:paddingRight="@dimen/_50sdp"
android:paddingTop="@dimen/_10sdp"
android:text="@string/fish_here"
android:textColor="@color/white"
android:textSize="@dimen/_12sdp" />
</LinearLayout>
</RelativeLayout>