Здравствуйте. Как в CardView добавить больше 1 элемента?
<android.support.v7.widget.CardView style="@style/FullCardView">
<ru.xxx.hhhh.view.CompatDrawableTextView
android:id="@+id/notifications"
style="@style/Settings.Item"
android:text="@string/setting_notifications"
app:drawableLeftCompat="@drawable/settings_logout" />
</android.support.v7.widget.CardView>
щас сколько бы CompatDrawableTextView я не добавлял в CardView они как бы добавляются, но все в одном месте отображаются. Т.е нечто такое `
<ru.xxx.hhhh.view.CompatDrawableTextView
android:id="@+id/notifications"
style="@style/Settings.Item"
android:text="@string/setting_notifications"
app:drawableLeftCompat="@drawable/settings_logout" />
<ru.xxx.hhhh.view.CompatDrawableTextView
android:id="@+id/notifications_2"
style="@style/Settings.Item"
android:text="@string/setting_notifications"
app:drawableLeftCompat="@drawable/settings_logout" />
</android.support.v7.widget.CardView>
отображается некорректно, в виде наложения двух элементов CompatDrawableTextView друг на друга. Прошу вшей помощи.
Добавьте LinearLayout:
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</LinearLayout>
И в него помещайте ваши элементы.
<android.support.v7.widget.CardView style="@style/FullCardView">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ru.xxx.hhhh.view.CompatDrawableTextView
android:id="@+id/notifications"
style="@style/Settings.Item"
android:text="@string/setting_notifications"
app:drawableLeftCompat="@drawable/settings_logout" />
</LinearLayout>
</android.support.v7.widget.CardView>
Современные инструменты для криптотрейдинга: как технологии помогают принимать решения
Апостиль в Лос-Анджелесе без лишних нервов и бумажной волокиты
Основные этапы разработки сайта для стоматологической клиники
Продвижение своими сайтами как стратегия роста и независимости