用动作条后,我认为,如果一个widget可以提供原生的Android平台。 我不知道,如果我们能抓住的样式,并将其应用于从动作条API的原生窗口部件(兼容库V4)或没有。
我所问的是微调部件如下面这在动作条主要使用。
检查下拉部件。
是否可以使用本机同样喜欢在列表视图?
非常感谢。
解决方案 适配器=新的ArrayAdapter< CharSequence的>(这一点,android.R.layout.simple_spinner_item,spinnerArrayList);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
spinner.setAdapter(适配器);
设置DropDownViewResource将工作
更重要的是: 在您的布局文件 添加后续$ C $下您的微调
风格=@安卓风格/ Widget.DeviceDefault.Light.Spinner
![安卓9.0已上线,究竟如何 全面剖析给大家](/d/file/2023/09-17/7d3df883ced84cf88f146e51c3e91dd2.png)
After using Actionbar i thought that what if same widget could be available for native android platform. I dont know if we can grab the styles and apply it to native widgets from actionbar apis(compatibility library v4) or not.
What i am asking is spinner widget like below which is mostly used in actionbar.
Check for dropdown widget.
Is it possible to use the same in native like in Listview ?
Many thanks.
解决方案adapter = new ArrayAdapter<CharSequence>(this,android.R.layout.simple_spinner_item, spinnerArrayList);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
spinner.setAdapter(adapter);
Set DropDownViewResource will work
What's more: In your layout file Add the follow code for your Spinner
style="@android:style/Widget.DeviceDefault.Light.Spinner"
相关推荐
最新文章