大马资讯论坛 - 马来西亚中文资讯平台

 找回密码
 注册
搜索
打印 上一主题 下一主题

[教学]android Scroll on Tablelayout 实现滚动

[复制链接]
跳转到指定楼层
1#
发表于 2012-7-8 22:13:40 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
[教学]android ScrollView on Tablelayout 实现滚动。
只需加个ScrollView在activity_main.xml即可实现。
  1. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  2.     xmlns:tools="http://schemas.android.com/tools"
  3.     android:layout_width="match_parent"
  4.     android:layout_height="match_parent" >
  5.    
  6.         <ScrollView
  7.         android:id="@+id/scrllvwNo1"
  8.         android:layout_width="fill_parent"
  9.         android:layout_height="fill_parent">
  10.             <TableLayout
  11.                     android:layout_width="fill_parent"
  12.                     android:layout_height="fill_parent"
  13.                     android:stretchColumns="0,1"
  14.                     android:id="@+id/maintable" >
  15.             </TableLayout>
  16.         </ScrollView>

  17. </RelativeLayout>
复制代码

手机版|大马资讯论坛  

GMT+8, 2024-4-28 01:08 , Processed in 0.028530 second(s), 13 queries , File On.

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表