2
제 레이아웃에서 마지막 뷰 (파란색 텍스트)가 아래 이미지와 같이 잘립니다.ConstraintLayout 마지막 뷰가 잘립니다.
<?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"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/ivIcon"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginEnd="10dp"
android:layout_marginTop="10dp"
android:background="@color/blue"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
<TextView
android:id="@+id/tvMain"
style="@style/ActorTextMainOne"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginTop="28dp"
android:text="28"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
<TextView
android:id="@+id/tvSecondaryOne"
style="@style/ActorTextSecondary"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginStart="4dp"
android:text="Jun"
app:layout_constraintBottom_toTopOf="@+id/tvSecondaryTwo"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/tvMain"/>
<TextView
android:id="@+id/tvSecondaryTwo"
style="@style/ActorTextSecondary"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="12dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="4dp"
android:text="2017"
app:layout_constraintBottom_toBottomOf="@+id/tvMain"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/tvMain"/>
<TextView
android:id="@+id/tvDescription"
style="@style/ActorTextDescription"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginTop="4dp"
android:text="@string/arrival_date"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@+id/tvMain"
app:layout_constraintTop_toBottomOf="@+id/tvSecondaryTwo"/>
</android.support.constraint.ConstraintLayout>
사용
ConstraintLayout 버전은 1.0.2
을 다음과 같이
나는 내가 여기서 뭔가를 분명 실종 생각 내 ConstraintLayout 설정을 가지고 있지만 나는 그것을 알아낼 수 없습니다입니다 아웃. ConstraintLayout의 높이를 wrap_content
으로 유지하면서 하단의 파란색 텍스트를 완전히 보이게하려면 어떻게해야합니까?
사실이 텍스트는 전체 파란색 텍스트를 보여줍니다. 그러나 tvMain으로 인한 추가 바닥 공간을 극복하기 위해 tvSecondaryTwo에 대해 제한되었습니다. 미안하지만, 나는 원래의 질문에서 이것을 언급하지 않았다. tvSecondaryTwo에 제약이있을 때 왜 작동하지 않는지 설명해 주시겠습니까? –
"tvMain으로 인한 추가 공간"을 이해하지 못했습니까? – Raghunandan
큰 텍스트보기로 인해 위쪽 및 아래쪽 패딩이 추가로 발생했습니다. 여기에 질문 한 것과 같은 문제 https://stackoverflow.com/questions/6593885/how-to-remove-the-top-and-bottom-space-on-textview-of-android –