1
我遵循本教程,基於音樂應用程序的播放列表使用的組件拖放listview實現。可拖動列表視圖的實現
http://www.techrepublic.com/blog/australia/making-a-sortable-listview-in-android/708
Dragable列表視圖工作正常,但在界面生成器有錯誤:
The following classes could not be instantiated:
- com.ib.myproject.TouchInterceptor (Open Class, Show Error Log)
See the Error Log (Window > Show View) for more details.
Tip: Use View.isInEditMode() in your custom views to skip code when shown in Eclipse
這是XML文件的一部分:
<com.ib.myproject.TouchInterceptor
android:id="@+id/listViewBankList"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:drawSelectorOnTop="false"
android:fastScrollEnabled="true">
</com.ib.myproject.TouchInterceptor>
哪些變量我應該申報? – Alex
我應該在使用該無法識別的視圖的Activity中編寫View.isInEditMode()嗎? – Alex