- Constructor. This constructor will result in the underlying data collection being
- immutable, so methods such as {@link #clear()} will throw an exception.
- @param context The current context.设置当前acitivity this
- @param resource The resource ID for a layout file containing a TextView to use when
-
instantiating views. 指明要应用的文字样式在哪个xml里
- @param objects The objects to represent in the ListView. 要应用的TextView的id
*/
public ArrayAdapter(@NonNull Context context, @LayoutRes int resource, @NonNull T[] objects) {
this(context, resource, 0, Arrays.asList(objects));
}
参数2:android.R.layout…
参数3:android.R.id…
参数4:数组
android:divider="#f00"分割线颜色
android:dividerHeight=“3dp” 高度
android:scrollbars=“none” 滚动条无
android:overScrollMode=“never” 两端到头提示:无