다음 코드 여기에서설정 텍스트 상자의 폭이
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/firstNumber"
/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
</LinearLayout>
</LinearLayout>
에서 참조하시기 바랍니다 폭, 텍스트 상자의 크기 (폭)는 매우 작습니다. 남은 너비에 맞게 설정하려고하지만 볼 수 있듯이 실패합니다. 나는 android:weight=1
도 사용했다. 제발 도와주세요, 어떻게 너비를 나머지 텍스트 상자의 너비를 설정할 수 있습니까?
고맙습니다. 그게 도움이 됐어! +1 나 : –