boxedEdges обрезать мой элемент в WearableRecyclerView - PullRequest
0 голосов
/ 26 марта 2019

Вот как данные отображаются без app:boxedEdges="true":

enter image description here

Когда я пытаюсь установить app:boxedEdges="true" для правильного размещения моих представлений на круглых экранах (как предложено в документации для разработчиков), это приводит к обрезанным представлениям:

enter image description here

Вот мои xml-файлы:

acitivity_main.xml

<?xml version="1.0" encoding="utf-8"?>
<android.support.wear.widget.BoxInsetLayout 
    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:background="@color/dark_grey"
    android:padding="@dimen/box_inset_layout_padding"
    tools:context="com.appw.testwatchapp.MainActivity"
    tools:deviceIds="wear">

    <android.support.wear.widget.WearableRecyclerView
        android:id="@+id/rv_flights"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:scrollbars="vertical" />

</android.support.wear.widget.BoxInsetLayout>

item.xml

<?xml version="1.0" encoding="utf-8"?>
<android.support.wear.widget.BoxInsetLayout 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="wrap_content"
    android:orientation="vertical">

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        app:boxedEdges="all">

        <TextView
            android:id="@+id/title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:fontFamily="sans-serif-medium"
            android:textSize="14sp" />

        <TextView
            android:id="@+id/info"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:fontFamily="sans-serif-condensed"
            android:textSize="14sp" />
    </LinearLayout>


</android.support.wear.widget.BoxInsetLayout>

Я установил менеджер раскладки в MainActivity следующим образом:

rvTest.setLayoutManager(new LinearLayoutManager(this));

Знаете, как я могу это исправить?

...