다음 뷰는 ConstraintLayout 내부에보기 배경 아래 사라집니다.
는하지만 설정되어있을 때 View
의 가시성이 gone
을 수는 다음과 같다 -
내가 View
에서보기
다음 뷰는 ConstraintLayout 내부에보기 배경 아래 사라집니다.
는하지만 설정되어있을 때 View
의 가시성이 gone
을 수는 다음과 같다 -
내가 View
에서보기
제거 속성 app:layout_constraintTop_toTopOf="@id/pickup_date"
를 사용하여 흰색 배경을 달성하려면 어떻게합니까.
이 시도 :
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="16dp">
<TextView
android:id="@+id/textView3"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="Select a pickup date"
android:textColor="#000"
tools:layout_editor_absoluteY="0dp"
tools:layout_editor_absoluteX="8dp" />
<Spinner
android:id="@+id/pickup_date"
android:layout_width="336dp"
android:layout_height="wrap_content"
android:spinnerMode="dropdown"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView3"
android:layout_marginTop="8dp"
tools:layout_editor_absoluteX="0dp" />
<View
android:layout_width="0dp"
android:layout_height="50dp"
android:background="@color/white"
android:layout_marginTop="8dp"
app:layout_constraintTop_toBottomOf="@+id/pickup_date"
tools:layout_editor_absoluteX="0dp" />
</android.support.constraint.ConstraintLayout>
출력 :이
UPDATE :
로보기 constrain
적절한 아니었다.
View
속성 app:layout_constraintBottom_toBottomOf="@id/pickup_date"
및 app:layout_constraintTop_toTopOf="@id/pickup_date"
은 Spinner
의 가운데 위치에 View
을 배치합니다.
자세한 내용은 documentation을 참조하십시오.
1 추가 속성 app:layout_constraintTop_toBottomOf="@+id/textView3"
을 View
에 :
View
이상
spinner
표시합니다.
app:layout_constraintStart_toStartOf="@id/view"
-spinner
을 추가하십시오.
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="16dp">
<TextView
android:id="@+id/textView3"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="Select a pickup date"
android:textColor="#000"
tools:layout_editor_absoluteY="0dp"
tools:layout_editor_absoluteX="8dp" />
<View
android:layout_width="wrap_content"
android:layout_height="70dp"
android:background="@color/white"
android:id="@+id/view"
tools:layout_editor_absoluteX="0dp"
android:layout_marginTop="8dp"
app:layout_constraintTop_toBottomOf="@+id/textView3" />
<Spinner
android:id="@+id/pickup_date"
android:layout_width="352dp"
android:layout_height="30dp"
android:spinnerMode="dropdown"
app:layout_constraintStart_toStartOf="@id/view"
tools:layout_editor_absoluteX="0dp"
tools:layout_editor_absoluteY="33dp" />
</android.support.constraint.ConstraintLayout>
출력 :
희망이 나는 스피너 뒤에 흰색 배경 /보기를 원하는,이 내가 원하는 것이 아니다 ~
도움이 될 것입니다. 아니 아래 – gaara87
내가 위의 의미 때, 나는 깊은 관점에서 의미. 업데이트되지 않은 답변 – gaara87
업데이트 된 답변을 적용하셨습니까? 보기 위에 회 전자를 표시합니다. 귀하의보기 제약은 적절하지 않았습니다. – FAT