在ExpandableTextView中渲染错误

时间:2017-08-14 19:57:08

标签: android

添加{"token":"....", "user":{"id":1, "email": "test@testing.com", "first": "test", "last": "guy"}}

时,我不知道为什么会出现渲染错误
ExpandableTextView

依赖关系为 <com.ms.square.android.expandabletextview.ExpandableTextView android:id="@+id/expand_text_view" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_toRightOf="@+id/first_linear" expandableTextView:maxCollapsedLines="4" expandableTextView:animDuration="200"> <TextView android:id="@+id/expandable_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="10dp" android:layout_marginTop="5dp"/> </com.ms.square.android.expandabletextview.ExpandableTextView>

以下是完整的XML文件:

compile 'com.ms-square:expandableTextView:0.1.4'

1 个答案:

答案 0 :(得分:0)

也许您缺少名称空间错误。尝试使用这个 你可以去here进行解释。

<com.ms.square.android.expandabletextview.ExpandableTextView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:expandableTextView="http://schemas.android.com/apk/res-auto"
    android:id="@+id/expand_text_view"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    expandableTextView:maxCollapsedLines="4"
    expandableTextView:animDuration="200">
    <TextView
        android:id="@id/expandable_text"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginLeft="10dp"
        android:layout_marginRight="10dp"
        android:textSize="16sp"
        android:textColor="#666666" />
    <ImageButton
        android:id="@id/expand_collapse"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="16dp"
        android:layout_gravity="right|bottom"
        android:background="@android:color/transparent"/>
</com.ms.square.android.expandabletextview.ExpandableTextView>