내 Android 앱에서 탭이 Activity
입니다. 탭 중 하나에는 두 개의 TextView
과 두 개의 EditText
이 있습니다.Android EditText가 나머지 공간을 차지하지 않습니다.
첫 번째 EditText
은 한 줄에 불과합니다. 그러나 다른 EditText
, android:id="@+id/paste_code"
이 나머지 공간을 차지하도록하고 싶지만, 내가 한 일과 관계없이 한 줄만 표시합니다. 화면에 맞을 숫자가 장치에 따라 다르기 때문에 수동으로 줄 수를 설정하고 싶지 않습니다.
다음은 관련 코드입니다. 탭이있는 모든 필요한 구성 요소에 중첩되어 있습니다. Activity
.
<ScrollView
android:id="@+id/basicTab"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Paste title"
android:layout_weight="0" />
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="@string/paste_title_hint"
android:id="@+id/paste_title"
android:lines="1"
android:gravity="top|left"
android:layout_weight="0" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Paste text"
android:layout_weight="0" />
<EditText
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:hint="@string/paste_hint"
android:id="@+id/paste_code"
android:gravity="top|left"
android:layout_weight="1" />
</LinearLayout>
</ScrollView>
실제로; 그 점에 대해 감사드립니다. 나는 내 문제를 해결 한 다른 질문에 대한 링크로 다른 대답에 댓글을 달았다. – Jamie
은 매력처럼 작동합니다! – Damjan