Android RelativeLayout 에서 작은 문 제 를 사용 합 니 다.
3634 단어 일상 오류
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:id="@+id/rl1"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<Button
android:layout_alignParentBottom="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="40sp"
android:text="buttom"/>
RelativeLayout>
<RelativeLayout
android:id="@+id/rl2"
android:layout_below="@id/rl1"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="buttom2"
android:textSize="50sp"
android:layout_alignParentRight="true"/>
RelativeLayout>
RelativeLayout>
여기 월 1 높이 는 wrap 이지 만content 하지만 rl2 는 표시 되 지 않 았 습 니 다.rl 에 button 이 안 드 로 이 드:layot 가 있 기 때 문 입 니 다.alignParent Bottom="true"속성 이기 때문에 rl1 높이 는 자가 적응 되 었 지만 가장 바깥쪽 구조의 높이 는 match 입 니 다.parent,그래서 이렇게 만 든 rl1 의 높이 는 사실 match 입 니 다.parent,이전에 이 문 제 를 주의 하지 못 했 기 때문에 여기 서 총 결 을 하 겠 습 니 다.
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
Android RelativeLayout 에서 작은 문 제 를 사용 합 니 다.Relative Layout 는 프로젝트 에서 없어 서 는 안 된다 고 할 수 있 지만 최근 에 사용 할 때 예전 에 주의 하지 않 았 던 문 제 를 발 견 했 습 니 다.저 는 Relative Layout 에서 두...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.