毕业论文开发语言企业开发JAVA技术.NET技术WEB开发Linux/Unix数据库技术Windows平台移动平台嵌入式论文范文英语论文
您现在的位置: 毕业论文 >> 移动平台 >> 正文

You must supply a resource ID for a TextView

更新时间:2014-11-22:  来源:毕业论文
sp;         android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:gravity="center_vertical"
                android:textStyle="bold"
                android:singleLine="true"
                android:ellipsize="end"
                ></TextView>
    </LinearLayout>
</LinearLayout>

换成BaseAdapter吧

I'm pretty sure the problem lies in your conversation_item layout. The docs state that you must provide a resource with a single TextView. What does that layout look like?

As an example, this is what the simple_list_item_1 layout looks like, yours should be pretty similar.

<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@android:id/text1"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:textAppearance="?android:attr/textAppearanceLarge"
    android:gravity="center_vertical"
    android:paddingLeft="6dip"
    android:minHeight="?android:attr/listPreferredItemHeight"
/>

EDIT:

I just edited the question so your layout will show. Your layout is indeed wrong, you cannot have the linear layout there if you're using that constructor. You can use the other constructor ( ArrayAdapter(Context context, int resource, int textViewResourceId, T[] objects) ) and provide your custom layout and your TextView's id.

上一页  [1] [2] [3] [4] 

设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©youerw.com 优尔论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。