0
FrameLayout 안에 Button과 ProgressBar가 있습니다. 내 ProgressBar가 Button이 비활성화 된 경우에만 어떻게 표시됩니까? 안드로이드 6.0.1에서 내 애플 리케이션을 실행 해요.버튼이 비활성화 된 경우에만 버튼 상단의 ProgressBar가 표시되는 이유는 무엇입니까?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="16dp">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<Button
android:id="@+id/btn_love"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Love" />
<ProgressBar
android:id="@+id/progress_bar"
style="?android:attr/indeterminateProgressStyle"
android:layout_width="22dp"
android:layout_height="22dp"
android:layout_gravity="right|center_vertical"
android:layout_marginRight="16dp" />
</FrameLayout>
</LinearLayout>
버튼의 너비가 레이아웃의 전체 너비를 취하는 match_parent이기 때문에 버튼 뒤에 숨어 있기 때문입니다. – Drv