android - Making list items width adjust dynamically to occupy the whole list width size -


basically i'm trying achieve pull few strings server, , create buttons number of strings, buttons must occupy whole screen (horizontally). problem each time different data items width must dynamic

i've tried put weights items doesn't work. possible achieve such thing list?

edit:

<android.support.v7.widget.recyclerview     android:id="@+id/gametypelist"     android:layout_width="match_parent"     android:layout_height="wrap_content"/> 

this item:

<?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:tools="http://schemas.android.com/tools"     android:layout_width="0"     android:layout_weight="1"     android:layout_height="match_parent"     android:orientation="vertical">  <button     android:fontfamily="sans-serif"     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:id="@+id/gametypebutton"     android:textsize="15sp"     android:paddingleft="16dp"     android:paddingright="16dp" />  </linearlayout> 


Comments

Popular posts from this blog

java - Suppress Jboss version details from HTTP error response -

gridview - Yii2 DataPorivider $totalSum for a column -

Sass watch command compiles .scss files before full sftp upload -