मैं निम्नलिखित है लेआउट:एंड्रॉयड रिश्तेदार लेआउट संरेखित माता पिता सही
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/test_ll"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background"
android:orientation="vertical" >
<RelativeLayout
android:id="@+id/main_layPanelCircle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|center_horizontal"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="15dp"
android:background="@drawable/main_panel_a"
android:orientation="vertical"
android:padding="10dp" >
<ImageView
android:id="@+id/main_imgBreachAlert"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="5dp" />
<Button
android:id="@+id/main_btnMap"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:background="@null"
android:drawableTop="@drawable/icon_find"
android:text="@string/main_locate"
android:textColor="@android:color/white"
android:textSize="10sp" />
<LinearLayout
android:id="@+id/main_llPanelCycleMiddle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/main_btnMap"
android:layout_centerInParent="true"
android:orientation="horizontal" >
<Button
android:id="@+id/main_btnLeft"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@null"
android:drawableTop="@drawable/icon_call"
android:text="@string/main_call"
android:textColor="@android:color/white"
android:textSize="10sp"
android:visibility="visible" />
<Button
android:id="@+id/main_btnEmergency"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@null"
android:drawableTop="@drawable/icon_emergency"
android:scaleType="center"
android:text="@string/main_emergency"
android:textColor="@android:color/white"
android:textSize="9sp"
android:textStyle="bold" />
<Button
android:id="@+id/main_btnRight"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@null"
android:drawableTop="@drawable/icon_store"
android:text="@string/main_store"
android:textColor="@android:color/white"
android:textSize="10sp" />
</LinearLayout>
<Button
android:id="@+id/main_btnMore"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/main_llPanelCycleMiddle"
android:layout_centerHorizontal="true"
android:background="@null"
android:drawableTop="@drawable/icon_more"
android:text="@string/main_more"
android:textColor="@android:color/white"
android:textSize="10sp" />
</RelativeLayout>
</LinearLayout>
जब मैं main_imgBreachAlert एंड्रॉयड सेट: layout_alignParentLeft = "true" eveerything (बाएं छवि) ठीक है, लेकिन जब मैं यह सही मेरा रिश्तेदार लेआउट हिस्सों के लिए सेट (बाएं छवि):
http://i.imgur.com/uDJqF0k.jpg?1
आप कृपया सलाह देने के लिए किया जा सका है कि कैसे मैं इस समस्या को ठीक कर सकता है।
Thnx
क्या आप इसे एक ही समय में बाएं और दाएं पैरेंट कर रहे हैं? यदि ऐसा है, तो यह अभिभावक को भरने के लिए मजबूर करता है, wrap_content को ओवरराइड करना (दो बुराइयों के कम से कम, दूसरा विकल्प लेआउट में किसी अन्य आकार को कम करने के लिए होगा)। –
क्या आपको अपने प्रश्न का उत्तर मिला? Iam एक ही समस्या में चल रहा है – Snake