Макет ниже обрезан на устройстве с круглым подбородком Wear. Устройство с круглым подбородком Wear отображает только первое TextView.
<?xml version = "1.0" encoding = "utf-8"?>
<android.support.wear.widget.BoxInsetLayout xmlns:app = "http://schemas.android.com/apk/res-auto"
xmlns:android = "http://schemas.android.com/apk/res/android"
xmlns:tools = "http://schemas.android.com/tools"
android:id = "@+id/lytLoginMain"
android:layout_width = "match_parent"
android:layout_height = "match_parent">
<android.support.constraint.ConstraintLayout
android:layout_width = "match_parent"
android:layout_height = "wrap_content"
app:boxedEdges = "all">
<TextView
android:id = "@+id/lblDlgLogoutTitle"
style = "@style/Title"
android:layout_width = "0dp"
android:layout_height = "wrap_content"
android:layout_marginStart = "16dp"
android:layout_marginEnd = "16dp"
app:layout_constraintEnd_toEndOf = "parent"
app:layout_constraintStart_toStartOf = "parent"
app:layout_constraintTop_toTopOf = "parent"
tools:text = "Hi Employee #1" />
<TextView
android:id = "@+id/lblDlgLogoutMessage"
style = "@style/Details"
android:layout_width = "0dp"
android:layout_height = "wrap_content"
android:layout_marginStart = "16dp"
android:layout_marginTop = "16dp"
android:layout_marginEnd = "16dp"
android:background = "@color/colorAccent"
android:gravity = "center_horizontal"
android:text = "@string/logout_msg"
android:textColor = "@color/black"
app:layout_constraintEnd_toEndOf = "parent"
app:layout_constraintStart_toStartOf = "parent"
app:layout_constraintTop_toBottomOf = "@+id/lblDlgLogoutTitle" />
</android.support.constraint.ConstraintLayout>
</android.support.wear.widget.BoxInsetLayout>
Но мой макет, который получил ScrollView, содержащий ConstraintLayout, который содержит 3 TextView и 2 EditText, отображается правильно.
Оба макета используются для AlertDialog, и я не знаю, что не так с моим макетом.
ОБНОВИТЬ:
Я попытался вставить новый TextView под вторым TextView, и теперь второй TextView отобразился, но новый TextView не виден.
<?xml version = "1.0" encoding = "utf-8"?>
<android.support.wear.widget.BoxInsetLayout xmlns:app = "http://schemas.android.com/apk/res-auto"
xmlns:android = "http://schemas.android.com/apk/res/android"
xmlns:tools = "http://schemas.android.com/tools"
android:id = "@+id/lytLogoutMain"
android:layout_width = "match_parent"
android:layout_height = "match_parent">
<android.support.constraint.ConstraintLayout
android:layout_width = "match_parent"
android:layout_height = "wrap_content"
app:boxedEdges = "all">
<TextView
android:id = "@+id/lblDlgLogoutTitle"
style = "@style/Title"
android:layout_width = "0dp"
android:layout_height = "wrap_content"
android:layout_marginStart = "16dp"
android:layout_marginTop = "16dp"
android:layout_marginEnd = "16dp"
app:layout_constraintEnd_toEndOf = "parent"
app:layout_constraintStart_toStartOf = "parent"
app:layout_constraintTop_toTopOf = "parent"
tools:text = "Hi Ricky Manalo" />
<TextView
android:id = "@+id/lblDlgLogoutMessage"
style = "@style/Details"
android:layout_width = "0dp"
android:layout_height = "wrap_content"
android:layout_marginStart = "16dp"
android:layout_marginTop = "16dp"
android:layout_marginEnd = "16dp"
android:gravity = "center_horizontal"
android:text = "@string/logout_msg"
android:textColor = "@color/black"
app:layout_constraintEnd_toEndOf = "parent"
app:layout_constraintStart_toStartOf = "parent"
app:layout_constraintTop_toBottomOf = "@+id/lblDlgLogoutTitle" />
<TextView
android:id = "@+id/textView4"
android:layout_width = "wrap_content"
android:layout_height = "50dp"
android:layout_marginStart = "8dp"
android:layout_marginTop = "8dp"
android:layout_marginEnd = "8dp"
android:text = "TextView"
app:layout_constraintEnd_toEndOf = "parent"
app:layout_constraintStart_toStartOf = "parent"
app:layout_constraintTop_toBottomOf = "@+id/lblDlgLogoutMessage" />
</android.support.constraint.ConstraintLayout>
</android.support.wear.widget.BoxInsetLayout>
Вы пробовали android:fitsSystemWindows="true" ? Подробнее здесь: https://developer.android.com/training/wearables/ui/layouts
Используя ответ @promanowicz и увеличив marginTop и marginBottom сообщения TextView, я смог отобразить полное сообщение TextView.
Это мой последний код.
<TextView
android:id = "@+id/lblDlgLogoutMessage"
style = "@style/Details"
android:layout_width = "0dp"
android:layout_height = "wrap_content"
android:layout_marginStart = "16dp"
android:layout_marginTop = "32dp"
android:layout_marginEnd = "16dp"
android:layout_marginBottom = "32dp"
android:fitsSystemWindows = "true"
android:gravity = "center_horizontal"
android:text = "@string/logout_msg"
android:textColor = "@color/black"
app:layout_constraintBottom_toBottomOf = "parent"
app:layout_constraintEnd_toEndOf = "parent"
app:layout_constraintStart_toStartOf = "parent"
app:layout_constraintTop_toBottomOf = "@+id/lblDlgLogoutTitle" />
Сработало частично. Мое сообщение отобразилось, но только первая строка.