我试图改变我所期望的优惠屏幕的背景。 我通过这样做,能够增加形象:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.applicationsettings);
findViewById(android.R.id.list).setBackgroundDrawable(getResources().getDrawable(R.drawable.app_bg));
}
The background comes up, but when I scroll, it shows a black cache in a normal list, I set the cache hint,,,, but here I cannot do that! is there a way around it?
I have tried: "findViewById(android.R.id.list).setDrawingCacheBackgroundColor(Color.TRANSPARENT);" but it didn t work.
Update The solution is:
ListView listView = (ListView)findViewById(android.R.id.list);
listView.setBackgroundDrawable(getResources().getDrawable(R.drawable.app_bg));
listView.setCacheColorHint(Color.TRANSPARENT);
由于:用户370305