我如何创建一个任意的ListView像那些在preferences类别(preferenceCategory)?
我发现 android.R.layout。preference_category
呈现的灰色TextView中却看不到它与Java code提到的任何地方。
我如何在任意的ListView像那些在创建类别 preferences(preferenceCategory)? 我发现android.R.layout。preference_category 呈现的灰色 TextView中却看不到它与Java code提到的任何地方。
http://jsharkey.org/blog/2008/08/18/separating-lists-with-headers-in-android-09/
请注意,code是安卓0.9 并且可能需要少量修改 在Android 1.5的工作。
我有一个Android 1.5兼容 变体在他的code起来的:
http://commonsware.com/AdvAndroid/
(向下滚动,点击来源$ C $ C 链接,并期待在 ListView控件/部分项目)
- 马克·墨菲(下议院人) http://commonsware.com 的忙碌codeR指南Android的发展的2.0版本可用!
谢谢,马克!
How do I create categories in an arbitrary ListView like those in Preferences (PreferenceCategory)?
I've found android.R.layout.preference_category
that renders that grey TextView but don't see it mentioned anywhere from java code.
How do I create categories in an arbitrary ListView like those in Preferences (PreferenceCategory)? I've found android.R.layout.preference_category that renders that grey TextView but don't see it mentioned anywhere from java code.
http://jsharkey.org/blog/2008/08/18/separating-lists-with-headers-in-android-09/
Note that the code is from Android 0.9 and may require minor modifications to work in Android 1.5.
I have an Android 1.5-compatible variant on his code up at:
http://commonsware.com/AdvAndroid/
(scroll down, click on the Source Code link, and look at the ListView/Sections project)
-- Mark Murphy (a Commons Guy) http://commonsware.com The Busy Coder's Guide to Android Development Version 2.0 Available!
Thanks, Mark!
上一篇:服用截图编程犯规捕获surfaceVIew的内容截图、内容、surfaceVIew
下一篇:Android的错误 - 致:java.lang.NoClassDefFoundError的:android.support.v4.util.SparseArrayCompat错误、lang、NoCl