LIstview和socallview这些东西不是提供了么,,,
解决方案 »
- 【救命啊】eclipse出错了,有截图、、
- 通过继承TextView类,可以实现设置一次颜色而改变所有文本控件的字体吗?
- root权限下的apk如何让他具有root权限,我是菜鸟不太了解
- 关于控件重叠
- android程序猿经常泡的论坛
- ImageView 的一个小问题
- 想在android 3.0以下版本实现search widget样式的搜索框,有什么办法没?
- fragment中使用自定义的layout出现问题,求教各位!
- android任务栈问题 在一个App (demo)里面:一个activity A 开启了一个服务,这个服务在发现应用B开启时start了一个本应用的ac
- 求助大神反编译APK遇到困难
- 累计计时的实现
- android.view.WindowLeaked问题
能说详细一些吗?
小弟刚学Android开发,
ListView能实现垂直自动滚动吗?可否给个例子呢。
我是想做一个公告板的程序,第一行是标题(如:XXXX通知),下面是具体内容,当具体内容信息很多时,要自动垂直滚动显示(循环)
ListView能实现垂直自动滚动吗?可否给个例子呢。
我是想做一个公告板的程序,第一行是标题(如:XXXX通知),下面是具体内容,当具体内容信息很多时,要自动垂直滚动显示(循环)
额,你可以这样,listview有个方法smoothScrollToPosition,可以滚动到你指定的位置,那么你想要的自动滚动,可以让它先滚到1,再滚到2,...,以此类推,用一个线程来滚,当滚到最后一项时,再滚到0重新开始。
ListView能实现垂直自动滚动吗?可否给个例子呢。
我是想做一个公告板的程序,第一行是标题(如:XXXX通知),下面是具体内容,当具体内容信息很多时,要自动垂直滚动显示(循环)
额,你可以这样,listview有个方法smoothScrollToPosition,可以滚动到你指定的位置,那么你想要的自动滚动,可以让它先滚到1,再滚到2,...,以此类推,用一个线程来滚,当滚到最后一项时,再滚到0重新开始。
这是一个思路,小弟初学Android,可否写个demo给我呢,谢谢。
把AutoScroll的布局文件改成如下即可。<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/linearlayout1"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:paddingLeft="60dp"
android:paddingTop="10dp"
android:paddingRight="60dp"
android:paddingBottom="20dp"
>
<TextView
android:id="@+id/tvTitle"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="24pt"
android:gravity="center"
android:paddingTop="130dp"
android:paddingBottom="20dp"
android:text="这里显示标题"
/> <com.tony.autoscroll.AutoScrollView
android:id="@+id/auto_scrollview"
android:layout_width="fill_parent"
android:layout_height="match_parent" > <LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<ImageView
android:id="@+id/imageview1"
android:scaleType="fitXY"
android:layout_width="fill_parent"
android:layout_height="440dp"
android:src="@drawable/bg1" />
<TextView
android:id="@+id/tvContent"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="24pt"
android:text="1、对财政收支的审计监督\n2、对金融机构的审计监督\n3、对事业组织的审计监督\n4、对企业的审计监督\n5、对政府投资建设项目的审计监督\n6、对社会保障等资金基金的审计监督\n7、对外资项目的审计监督\n8、经济责任审计监督\n9、其他法律、行政法规规定事项的审计监督\n10、专项审计调查\n11、对内部审计机构的指导监督\n12、对社会审计机构审计质量的检查\n"
/>
<ImageView
android:id="@+id/imageview2"
android:scaleType="fitXY"
android:layout_width="fill_parent"
android:layout_height="440dp"
android:src="@drawable/bg1" />
</LinearLayout>
</com.tony.autoscroll.AutoScrollView></LinearLayout>