如何在CursorAdapter的构造函数中使用getBackground()而其中没有父视图?

时间:2011-09-15 14:41:14

标签: android

我需要backgroundDrawable)为我layout创建的item ListView Adapter。要求是在我的Viewgroup构造函数中执行此操作,但我缺少父inflateprivate class MAdapter extends CursorAdapter { private Drawable defaultDrawable; public MAdapter(Context context, Cursor c, boolean autoRequery) { super(context, c, autoRequery); this.defaultDrawable = // here I need to get Drawable which is defined as background for the view which is going to be used for `View` for the list row item } 。还有其他方法吗?

{{1}}

0 个答案:

没有答案