मैं ImageView
एक और ImageView
ओवरले करना चाहता हूं; वृत्त हरी का केवल आधा छवि डालने जाता है:एंड्रॉइड - ImageView ओवरले एक और छवि दृश्य
मैं RelativeLayout
उपयोग करने की कोशिश की है और दोनों ImageView
अंदर डाल दिया। फिर मैं android:layout_alignBottom
का उपयोग करके छवि पर सर्कल को ओवरले करता हूं। इसने ओवरले किया लेकिन मुझे पता नहीं है कि ऑफ़सेट कैसे सेट करें ताकि सर्कल का केवल आधा आधार छवि को ओवरले कर रहा हो।
संपादित करें:
क्षमा करें, यहाँ मेरी लेआउट एक्सएमएल कोड
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginBottom="32sp" >
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/ic_person_black"
android:adjustViewBounds="true"
android:id="@+id/image_view_product" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@id/image_view_product"
android:layout_centerHorizontal="true"
android:background="@drawable/image_view_circle"
android:src="@drawable/ic_circle" />
</RelativeLayout>
देखें [एंड्रॉयड: लेआउट के बीच ओवरलैप पर imageView रखने] (http://stackoverflow.com/questions/25127468/android-placing-imageview-on-overlap-between-layouts) –
पोस्ट करें जो आपने कोशिश की है – Mohit
'FrameLayout' का उपयोग करें। – Piyush