Android uygulamasında <include>
etiketini kullanarak bazı düzen bileşenlerini yeniden kullanmaya çalışıyorum.layout_weight özniteliği <include> etikette
Liman:: Farklı liman ve kara düzenleri var
<LinearLayout a:layout_weight="1" a:layout_width="match_parent" a:layout_height="0dp"> <include layout="@layout/calc_equals_button" a:layout_weight="4"/> <include layout="@layout/calc_display"/> </LinearLayout>
Arazi:
<LinearLayout a:layout_weight="1" a:layout_width="match_parent" a:layout_height="0dp"> <include layout="@layout/calc_equals_button"/> <include layout="@layout/calc_display"/> </LinearLayout>
Ana fark a:layout_weight="4"
, yani ben istiyorum benim port yöneliminde daha küçük olmak için calc_equals_button bileşeni. DEĞİL - ı aksi doğrudan herşey yolunda çalışır calc_equals_button
bileşeni, ör .:
<LinearLayout a:layout_weight="1" a:layout_width="match_parent" a:layout_height="0dp">
<DirectionDragButton
xmlns:a="http://schemas.android.com/apk/res/android"
a:id="@+id/equalsButton"
a:text="="
a:layout_width="match_parent"
a:layout_height="match_parent"
a:layout_weight="4"
style="@style/control_button_style"
a:onClick="numericButtonClickHandler"/>
<include layout="@layout/calc_display"/>
</LinearLayout>
gömmek çalışırsanız
şeydir. İşte
calc_equals_button.xml numunesidir:
<DirectionDragButton
xmlns:a="http://schemas.android.com/apk/res/android"
a:id="@+id/equalsButton"
a:text="="
a:layout_width="match_parent"
a:layout_height="match_parent"
style="@style/control_button_style"
a:onClick="numericButtonClickHandler"/>
"Güncel", ICS'de olduğu gibi değiştirilecek? –
Ancak bu sorunlara nasıl yardımcı olabilir? –
@MichellBak Hayır, bu sınırlama ICS'de hala mevcuttur. –