2016-08-05 11 views
0

com.android.support:recyclerview-v7:23.2.1 に私のライブラリを更新しました。このRecyclerViewはXMLファイルにあります。RecyclerViewの高さラップコンテンツは、Androidサポートライブラリでも動作しません。23.2

<android.support.v7.widget.RecyclerView 
       android:id="@+id/activityRecicler" 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:layout_marginTop="15dp" 
       /> 

とレイアウト行は次のとおりです。

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:orientation="horizontal" android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    > 


    <TextView 
     android:layout_width="150dp" 
     android:layout_height="wrap_content" 
     android:id="@+id/activity" 
     android:textStyle="bold" 
     android:layout_weight="0.5" 
     android:text="description" 
     /> 

    <TextView 
     android:id="@+id/hours" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:textColor="@android:color/black" 
     android:layout_weight="0.2" 
     android:padding="8dp" 
     /> 
    <Button 
     android:id="@+id/deleteRow" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_weight="0.3" 
     android:text="delete" 
     /> 

しかし、あまりにも長いとき、まだ一部に隠されているIDが「記述」と私のTextView。

答えて

1

にごTextView属性layout_widthを変更してみてください。

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:orientation="horizontal" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    > 


    <TextView 
     android:layout_width="0dp" 
     android:layout_height="wrap_content" 
     android:id="@+id/activity" 
     android:textStyle="bold" 
     android:layout_weight="1" 
     android:text="description" 
     /> 

    <TextView 
     android:id="@+id/hours" 
     android:layout_width="0dp" 
     android:layout_height="wrap_content" 
     android:textColor="@android:color/black" 
     android:layout_weight="1" 
     android:padding="8dp" 
     /> 
    <Button 
     android:id="@+id/deleteRow" 
     android:layout_width="0dp" 
     android:layout_height="wrap_content" 
     android:layout_weight="1" 
     android:text="delete" 
     /> 
+0

ありがとうございます!それは動作します! – LorenzoBerti

+0

ようこそ! –

0

は、コードの下に追加し、layout_rowでwrap_content

<TextView 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:id="@+id/activity" 
     android:textStyle="bold" 
     android:layout_weight="0.5" 
     android:text="descriptions" 
     /> 
関連する問題