Android 布局控件——滚动条视图,日期,时间
今天学长讲了一些控件,比较强的那种控件。 刚开始讲了图片,但是图片我前面写过了就跳过。 滚动条牛牛们应该很熟悉,也常用哈。 这是垂直的滚动条视图哈 一起来用吧! <ScrollView android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/scrollView" android:fillViewport="true"> <TextView android:id="@+id/text" android:layout_width="70dp" android:layout_height="wrap_content" android:background="@color/colorPrimary" android:gravity="top" android:layout_marginBottom="100dp" android:text="text"> </TextView> </ScrollView> 主活动: final TextView t=findViewById(R.id.text); for (int i = 0; i <30; i++) { t.append("\n分"+i); } 效果: 注意右边的那个灰色的,就是滚动条啦! 注意: