1
다른 뷰의 가시성에서 데이터 바인딩 알파 설정하려고 :내가 예는 다음과 같이 실행이
<Switch
android:id="@+id/sw_state"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:checked="true"
android:enabled="@{!swAuto.checked}"
android:paddingBottom="8dp"
android:paddingTop="8dp"
android:text="Zustand"
android:textColor="@{swAuto.checked ? @color/outlet_preview_card_text_disabled : @color/outlet_preview_card_text}"
android:textSize="14sp"
tools:textColor="@color/outlet_preview_card_text"/>
을하지만 다른 사람의 뷰 가시성 등에 따라 다른보기에 알파를 설정해야합니다
<LinearLayout
android:id="@+id/ll_global_outlet"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginStart="10dp"
android:layout_marginTop="10dp"
android:background="@drawable/round_background_white"
android:orientation="vertical"
android:alpha="@{ivProgressBar.visibility == View.VISIBLE ? 0.90 : 1}"
android:padding="10dp">
는하지만이 오류가 점점 오전 :
오류 : (45, 30) 'android.widget.ImageView'
0 유형에 양방향 바인딩 속성 '가시성'을 확인할 수 없습니다내가 뭘 잘못하고 있는지 알기! 누군가가 내가 그렇게 할 수 없었다 궁금 경우
<ImageView
android:id="@+id/iv_progress_bar"
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_gravity="center"
android:visibility="gone"
tools:visibility="visible"
android:background="@drawable/progress_bar_animation"/>
'보기 '클래스를 가져 왔습니까? –
예 와 같은 클래스를 가져 왔습니다. –
RogerParis
왜이 두 가지 다른 가시성 속성을 추가 했습니까 : android : visibility = "gone"및'tools : visibility = "visible" '? – Rehan