Я новичок в андроиде, и мне нужно наложить круговое изображение на голове коробки. Как мне это сделать .Как мне совместить мой взгляд
Ниже приведен мой код.
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginBottom="80dp"
android:layout_alignBottom="@+id/farmerSearchLinearLayout"
android:src="@drawable/upload_pic" />
<LinearLayout
android:id="@+id/farmerSearchLinearLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginTop="20dp"
android:background="@drawable/box1"
android:orientation="vertical"
android:padding="20dp" >
<RelativeLayout
android:id="@+id/RelativeLayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal" >
<ImageView
android:id="@+id/image1"
android:layout_width="wrap_content"
android:layout_height="80dp"
android:layout_centerInParent="true"
android:src="@drawable/field" />
<ImageView
android:id="@+id/searchClickImg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignRight="@+id/image1"
android:layout_centerInParent="true"
android:src="@drawable/click" />
<TextView
android:id="@+id/farmerNameTxtView"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/image1"
android:layout_centerVertical="true"
android:layout_marginLeft="61dp"
android:ellipsize="none"
android:scrollHorizontally="false"
android:text="Farmer Name"
android:textColor="#333333"
android:textSize="13sp" />
<EditText
android:id="@+id/codeSearchEditTxt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_marginLeft="10dp"
android:layout_marginRight="40dp"
android:layout_marginTop="22dp"
android:layout_toLeftOf="@+id/searchClickImg"
android:hint="Enter Farmer Code"
android:textColor="#b40e5b"
android:textSize="16sp" />
</RelativeLayout>
<TextView
android:id="@+id/addressTxtView"
android:layout_width="400dp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:gravity="center"
android:text="Address"
android:textColor="#333333"
android:textSize="13sp" />
</LinearLayout>
</RelativeLayout>
мне нужно, чтобы перекрывать upload_pic (небольшой круглый круг ПОС) изображение из ImageView на LinearLayout, которые состоят из коробки. Мне нужно половину изображения вырезать коробку в центре и над полем изображения
ты в курсе с framelayout ... Вы можете сделать это с помощью этого ... – Moinkhan
Используйте framelayout или RelativeLayout размещать изображения перекрывающих друг другие –
Плагины Android основаны на иерархических данных. Начальник коробки должен наступить первым, а затем кругом! –