AppCompatSpinner vs android.widget.Spinner for app with min SDK version 14

白昼怎懂夜的黑 提交于 2020-12-30 05:29:23

问题


I am developing application with minimum SDK version 14 Ice-cream sandwitch and targeted version is Android Marshmallow.

DO I need to use AppCompatSpinner or normal spinner will work on ICS devices with all material look and feel?


回答1:


If you look at the AppCompatSpinner page, you will see the folowing line.

This will automatically be used when you use Spinner in your layouts. You should only need to manually use this class when writing custom views.

So you don't have to choose between Spinners and AppCompatSpinners.




回答2:


Depends on what you want to achieve. If backward compatibility is important for you, then definitely go for AppCompat components because they are designed with backward compatibility in mind. The non-appcompat components are the way forward and you should choose them if you are more interested in the new features they bring in compared to their appcompat cousins. So, it all depends on your Application support.



来源:https://stackoverflow.com/questions/38736423/appcompatspinner-vs-android-widget-spinner-for-app-with-min-sdk-version-14

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!