怎样使 Android 的 ScrollView 动态请求数据

各位大哥,小弟最近遇到一个问题,在做android一个页面的时候,我这样设计的
pubic class EventView extends LinearLayout{
  public LinearLayout totalAreaLayout = null;
  public ScrollView fatherScrollView = null;
  public EventView(Context context) {
super(context);
initial(context);
}
  initial(Context context) {

  totalAreaLayout = new LinearLayout(context);
  totalAreaLayout.setGravity(Gravity.VERTICAL);
  TextView titleTip = new TextView(context);
  titleTip.setText("here is the information:");
  totalAreaLayout.addView(titleTip ); 

  fatherScrollView = new ScrollView(context);
  fatherScrollView.addView(addContentLinearLayout (context));
  totalAreaLayout.addView(fatherScrollView);
  addView(totalAreaLayout);
  }
  LinearLayout addContentLinearLayout (Context context){
   
  LinearLayout sonLinearLayout = new LinearLayout(context);
   
  //some views
   
  return sonLinearLayout ;
   
  }
}
现 在我遇到的问题就是,由于里linearLayout里面加载的数据是从网络上动态获取的。所以不能一次加载完,所以我想做到,当ScrollView 的ScrollBar滑动到最底端的时候,获取此时的时间,然后请求数据,move掉当前的数据,加载现在请求的数据。
所以想问问各位大哥,我的ScrollView 布局只是我这个外围的linearLayout布局的一个部分。我应该获取什么事件。并且该怎么样做比较好呢?会不会受到外层布局的影响呢?
分不到,谢谢
万分感谢!
谢谢

转载于:https://my.oschina.net/u/138169/blog/17070

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值