ScrollView、ListView、RecyclerView 和 WebView 有什么区别?
what is the difference between ScrollView, ListView, RecyclerView and WebView?
我想知道何时使用 ScrollView 或 ListView 或 RecyclerView 以及我们可以使用 WebView 构建应用程序吗?
滚动视图
ScrollView is used to put different or same child views or layouts and the all can be scrolled.
列表视图
ListView is used to put same child view or layout as multiple items. All these items are also scrollable.
Simply ScrollView is for both homogeneous and heterogeneous collection. ListView is for only homogeneous collection.
什么是 RecyclerView?
The RecyclerView widget is a more advanced and flexible version of ListView.
为什么选择 RecyclerView?
RecyclerView is a container for displaying large data sets that can be scrolled very efficiently by maintaining a limited number of views.
什么时候应该使用RecyclerView?
You can use the RecyclerView widget when you have data collections whose elements
changes at runtime based on user action or network events.
网页浏览
WebView in Android turns the application into a web application. It comes from
android.webkit.WebView. Here, the WebView class is an extension of Android's View
class which is used to show the web pages. WebView doesn't include all the features
of Web-browser-like navigation controls or an address bar etc.
我想知道何时使用 ScrollView 或 ListView 或 RecyclerView 以及我们可以使用 WebView 构建应用程序吗?
滚动视图
ScrollView is used to put different or same child views or layouts and the all can be scrolled.
列表视图
ListView is used to put same child view or layout as multiple items. All these items are also scrollable.
Simply ScrollView is for both homogeneous and heterogeneous collection. ListView is for only homogeneous collection.
什么是 RecyclerView?
The RecyclerView widget is a more advanced and flexible version of ListView.
为什么选择 RecyclerView?
RecyclerView is a container for displaying large data sets that can be scrolled very efficiently by maintaining a limited number of views.
什么时候应该使用RecyclerView?
You can use the RecyclerView widget when you have data collections whose elements
changes at runtime based on user action or network events.
网页浏览
WebView in Android turns the application into a web application. It comes from
android.webkit.WebView. Here, the WebView class is an extension of Android's View
class which is used to show the web pages. WebView doesn't include all the features
of Web-browser-like navigation controls or an address bar etc.