버튼의 높이를 부모 레이아웃의 높이에 맞출 수 있습니까? 특정 측정 기준 값을 지정하고 싶지 않습니다.부모 레이아웃에 맞게 버튼 높이를 줄이는 방법
RelativeLayout
안에 TextView
및 Button
이있는 간단한 레이아웃이 있습니다. 그러나이 레이아웃의 높이는 버튼의 기본 높이에 맞추려고하기 때문에 너무 큽니다.
<RelativeLayout
android:layout_height="wrap_content"
android:layout_width="match_parent"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Reminder"
/>
<Button
android:id="@+id/btn_addremainder"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@null"
android:text="+"
android:layout_alignParentRight="true"
/>
</RelativeLayout>
변경 버튼 layout_height는 wrap_content 수 있습니다. –