如何在Android ListView
中列表为空时显示文本的格式?为ListView设置“空列表”文本android
<ListView
android:id="@+id/android:list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/transparent"
android:cacheColorHint="@android:color/transparent"
android:dividerHeight="1dip" />
<TextView
android:id="@+id/android:empty"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/test_list"
android:textColor="@color/white"
android:textSize="25sp"
/>
我想将字体设置为从资产字样..
mTypeFace = Typeface.createFromAsset(context.getAssets(), "fonts/myFont.ttf");
mEmptyTextView = (TextView)findViewById(**????**)
mEmptyTextView.setTypeface(mTypeFace);
它会为ListFragment工作吗?在ListFragment的API 22的list_content.xml中,使用了@ + android:id/internalEmpty。 – sandrstar