LinearLayout 안에 RelativeLayout이 있습니다. 이 내부에는 ProgressBar 및 기타 요소가 있습니다.android ProgressBar가 부모 LinearLayout의 높이 치수를 변경 중입니다
현재 문제는 ProgressBar가 RelativeLayout 내부에 배치 될 때 부모 LinearLayout의 높이를 확장한다는 것입니다.
다음은 내가 가지고있는 기본 사항입니다. 이 ProgressBar의 높이에 의해 상위의 LinearLayout의 높이를 연장처럼
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_weight="1"
android:weightSum="2">
<RelativeLayout
android:id="@+id/timer1"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@android:color/darker_gray">
<ProgressBar
android:layout_width="200dp"
android:layout_height="20dp"
style="@android:style/Widget.ProgressBar.Horizontal"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:layout_centerInParent="true"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/timer2"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@android:color/holo_blue_light"/>
</LinearLayout>
ProgressBar를 보인다. 어느 것이 당연히 원하지 않는지.
위의 LinearLayout은 weightSum = "3"인 또 다른 수직 LinearLayout 내부에 있음을 명심하십시오. 따라서이 높이의 왜곡은 모든 것이 수직으로 화면에 맞지 않음을 의미합니다.
내가 생각할 수있는 한 가지 결함은 코드가 아직 완성되지 않았기 때문에 (3 단계 각각에 ProgressBar를 넣지 않음) 단지 버크 (quirk)라는 것입니다. 내가하고 다시보고 할게. 하지만 여전히 나에게 이것은 좋은 일이 될 수없는 것처럼 보입니다.
첫 번째 상대 레이아웃의 _android : layout_height = "wrap_content"_을 변경하십시오. 그냥 시도해보십시오. 확실하지 않습니다. –