मेरे लेआउट संरचना इसFrameLayout मार्जिन काम नहीं कर रहा
LinearLayout
FrameLayout
ImageView
ImageView
FrameLayout
TextView
LinearLayout
मैं दो imageView जो FrameLayout अंदर हैं के लिए मार्जिन की स्थापना की है की तरह है। लेकिन फ्रेमलेआउट मार्जिन को त्याग दिया जाता है और यह हमेशा छवि को शीर्ष बाएं कोने में सेट करता है। अगर मैं फ्रेमलेआउट से लाइनर तक मार्जिन के काम को सही तरीके से बदलता हूं। इसे कैसे संभालें?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/inner1"
>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
<ImageView
android:layout_width="24px"
android:layout_height="24px"
android:id="@+id/favicon"
android:layout_marginLeft="50px"
android:layout_marginTop="50px"
android:layout_marginBottom="40px"
android:layout_marginRight="70px"
/>
<ImageView
android:layout_width="52px"
android:layout_height="52px"
android:id="@+id/applefavicon"
android:layout_marginLeft="100px"
android:layout_marginTop="100px"
android:layout_marginBottom="100px"
android:layout_marginRight="100px"
/>
</FrameLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/title"
android:layout_marginLeft="10px"
android:layout_marginTop="20px"
android:textColor="#FFFFFF"
android:textSize = "15px"
android:singleLine = "true"
/>
</LinearLayout>
में कोई वज़न नहीं है यह काम करता है, लेकिन यह मुझे गंदा महसूस करता है। मैंने सोचा कि मैं सीएसएस हैक्स के दिनों से बच गया था ... – erlando
यह काम करता है, यह सोच रहा है कि यह एक बग है या नहीं? – Johnny
FrameLayout.LayoutParams.gravity में 2.3 – JPM