大佬教程收集整理的这篇文章主要介绍了使用android.support.v4.app.ListFragment时,列表的背景颜色在滚动时变为白色;,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我想更改列表滚动时间颜色更改.为此我正在使用以下代码.
public static class ArrayListFragment extends ListFragment { int mNum; /** * Create a new instance of CounTingFragment,providing "num" * as an argument. */ static ArrayListFragment newInstance(int num) { ArrayListFragment f = new ArrayListFragment(); // Supply num input as an argument. Bundle args = new Bundle(); args.puTint("num",num); f.setArguments(args); return f; } /** * When creaTing,retrieve this instance's @R_197_10793@er from its arguments. */ @Override public void onCreate(Bundle savedInstanceStatE) { super.onCreate(savedInstanceStatE); mNum = getArguments() != null ? getArguments().geTint("num") : 1; } /** * The Fragment's UI is just a simple text view showing its * instance @R_197_10793@er. */ @Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceStatE) { View v = inflater.inflate(R.layout.fragment_pager_list,container,falsE); //v.setBACkgroundresource(R.drawable.BACkground); View tv = v.findViewById(R.id.text); ((TextView)tv).setText(framename()); return v; } // @Override public void onActivityCreated(Bundle savedInstanceStatE) { super.onActivityCreated(savedInstanceStatE); setlistadapter(new ArrayAdapter<String>(getActivity(),android.R.layout.simple_list_item_checked,Rishavarraylist() )); }
请告诉我如何在运行时更改滚动列表的背景?谢谢.
android:cachecolorHint="#00000000"
以上是大佬教程为你收集整理的使用android.support.v4.app.ListFragment时,列表的背景颜色在滚动时变为白色;全部内容,希望文章能够帮你解决使用android.support.v4.app.ListFragment时,列表的背景颜色在滚动时变为白色;所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。