Я пытаюсь сделать ряд для recyclerview, строка будет расщепляется в 3 колонкиандроида относительная компоновка не работает должным образом
- Первый - Кнопка Image
- второго контента (TextViews)
- Третий - Кнопка Image
и когда я загрузить огромное содержание, он делает макет расти, и его хорошо, но я хочу, боковые панели, чтобы расти в высоту тоже:
, что я хочу (и Android-студия SHOW, которая будет (лжец =()):
и то, что я действительно получил:
и мой row.xml является это:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<RelativeLayout
android:id="@+id/thebig_father_layout"
android:layout_width="match_parent"
android:background="@android:color/holo_blue_bright"
android:layout_height="match_parent">
<RelativeLayout
android:background="@android:color/holo_red_dark"
android:layout_alignParentLeft="true"
android:gravity="center_vertical"
android:id="@+id/i_must_grow_in_height"
android:layout_width="48dp"
android:layout_height="match_parent">
<TextView
android:text="Grow and to center!!!!"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</RelativeLayout>
<RelativeLayout
android:background="@android:color/holo_green_dark"
android:layout_toRightOf="@+id/i_must_grow_in_height"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_toLeftOf="@+id/relativeLayout4">
<LinearLayout
android:gravity="center_vertical"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:text="Im the content i can grow in height but the side panels must GROW TOO"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:text="Im the content i can grow in height but the side panels must GROW TOO"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:text="Im the content i can grow in height but the side panels must GROW TOO"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:text="Im the content i can grow in height but the side panels must GROW TOO"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<Button
android:text="Random Content"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<Button
android:text="Random Content"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<Button
android:text="Random Content"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<Button
android:text="Random Content"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<Button
android:text="Random Content"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<Button
android:text="Random Content"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
</RelativeLayout>
<RelativeLayout
android:background="@android:color/holo_red_dark"
android:layout_width="48dp"
android:gravity="center_vertical"
android:layout_alignParentRight="true"
android:layout_height="match_parent"
android:id="@+id/relativeLayout4">
<TextView
android:text="C'mon i need it too"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</RelativeLayout>
</RelativeLayout>
</RelativeLayout>
кто-то может объяснить ПОЧЕМУ его не растут (красный макет)?
Не могли бы вы показать нам как вы показываете этот макет? просто с setcontentview? –
Добавить центр в вертикальном положении верен в компоновке релейного выхода. Я надеюсь на его работу. – Destro
@NikoYuwono yep, ничего особенного просто -> '' 'View v = LayoutInflater.from (parent.getContext()) .inflate (R.layout.mynew_textview, parent, false);' '' – user2582318