선형 레이아웃의 텍스트 뷰 및 편집 텍스트가 있습니다. 내가 볼 수있는 부모의 비율로 너비를 설정하기 위해 가중치를 사용하는 모든 예를 보았던 것처럼 모든 뷰가 전혀 표시되지 않습니다.Android 무게가 작동하지 않습니다.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView
android:id="@+id/custLabel"
android:layout_height="wrap_content"
android:layout_weight=".35"
android:layout_width="0dip"
android:text="Name"/>
<EditText
android:id="@+id/customer"
android:layout_height="wrap_content"
android:layout_weight=".65"
android:layout_width="0dip"/>
</LinearLayout>
visual studio에서 모노 드로이드를 사용하고 있습니다. 장치에 직접 디버깅. – jmease
'LinearLayout'은 세로 방향입니다. 'TextView'와'EditText'에 대해'layout_width'를''wrap_content''와'layout_height'을'0dp'로 설정하십시오. 당신은 잘못하고있는 중입니다. – Squonk
@MisterSquonk 내가 전문가의 일부보다 금식 한 것은 처음이다 :-) – Gangnus