화면 크기에 관계없이 콘텐츠를 모든 화면에 채우는 방법은 무엇입니까?
이미지는 아래와 같습니다. 오른쪽이 아닌 왼쪽 이미지처럼 보이기를 원합니다 .
RelativeLayout을 사용하는 경우 컨테이너를 LinearLayout으로 변경하고 layout_weight를 자식으로 설정할 수 있습니다.
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1"
android:text="Text 1"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1"
android:text="Text 2"/>
</LinearLayout>
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다