У меня горизонтальное изображение реселлера с макетом корня карты и оно имеет огромные отступы
Предполагается, что просмотр карты заканчивается в конце просмотра текста
вот файлы XML:
<?xml version="1.0" encoding="utf-8"?> <android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" xmlns:app="http://schemas.android.com/apk/res-auto" app:cardBackgroundColor="@android:color/darker_gray"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:hint="@string/main_category_name" android:id="@+id/mainCategoryName" android:layout_centerInParent="true" android:textColor="@android:color/black" android:textSize="16sp" android:textStyle="bold"/> </android.support.v7.widget.CardView>
вот второй файл:
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".ShoppingPackage.MainShoppingActivity"> <android.support.v7.widget.RecyclerView android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/mainCategoriesRecyclerView" android:background="@android:color/white" android:clipToPadding="false"/> <android.support.v7.widget.RecyclerView android:layout_width="match_parent" android:layout_height="match_parent" android:layout_below="@id/mainCategoriesRecyclerView" android:id="@+id/subCategoriesRecyclerView" android:clipToPadding="false"/> </RelativeLayout>
Ответ состоит в том, чтобы удалить hint Я не знаю, почему, но подсказка, кажется, дает заполнение, поэтому я использовал text, и у меня больше не было заполнения
hint
text