Некоторые виды не обертывают его содержимое при использовании внутри CardView в Android L. При тестировании того же кода на более ранних версиях Android все работает отлично. Вот мой макет:Виды не обертывания содержимого внутри Вид карты
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="@dimen/stock_row_height"
card_view:cardCornerRadius="@dimen/default_elevation"
card_view:cardElevation="@dimen/default_elevation"
card_view:cardUseCompatPadding="true">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/logo"
android:layout_width="@dimen/portals_logo_width"
android:layout_height="match_parent"
android:layout_centerVertical="true"
android:layout_margin="@dimen/portals_logo_margin"
android:adjustViewBounds="true"
android:src="@drawable/image_placeholder" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toEndOf="@+id/logo"
android:layout_toRightOf="@+id/logo"
android:background="@android:color/black"
android:orientation="vertical">
<TextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/holo_green_light"
android:text="portalAddress.com"
android:textColor="@android:color/black"
android:textSize="@dimen/portals_title_text_size" />
<TextView
android:id="@+id/description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/holo_blue_light"
android:text="Sincronizado 04/12/14 às 14:25"
android:textColor="@color/medium_gray"
android:textSize="@dimen/portals_description_text_size" />
</LinearLayout>
</RelativeLayout>
Проблема заключается в том, что TextView "wrap_content" по высоте не работает. Это визуализация предварительного просмотра из Android Studio:
Это тот же макет работает на Samsung Galaxy S5 с Android L:
Samsung Galaxy S5 with Android L
Если я пытаюсь установить фиксированную высоту как для TextView (соответственно 25dp и 18dp) родительский LinearLayout не переносит контент таким же образом, как TextView.
[Фиксированная высота TextView] [3]
я что-то не хватает? Не знаю, что не так, потому что это происходит только в Android L.
EDIT: Я все еще ищу решение этой проблемы.
У меня недостаточно репутации, чтобы опубликовать 3 ссылки, так что вот адрес последнего - [Исправлена высота для TextView] (http://imgur.com/2lMeWak) – Birk
Вы нашли решение? У меня такая же проблема. – Apsaliya