rokevin
移动
前端
语言
  • 基础

    • Linux
    • 实施
    • 版本构建
  • 应用

    • WEB服务器
    • 数据库
  • 资讯

    • 工具
    • 部署
开放平台
产品设计
  • 人工智能
  • 云计算
计算机
其它
GitHub
移动
前端
语言
  • 基础

    • Linux
    • 实施
    • 版本构建
  • 应用

    • WEB服务器
    • 数据库
  • 资讯

    • 工具
    • 部署
开放平台
产品设计
  • 人工智能
  • 云计算
计算机
其它
GitHub
  • ScrollView

ScrollView

动态修改margin值 如果ScrollView 的parent布局是LinearLayout 则用LinearLayout RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) svScroll.getLayoutParams(); layoutParams.setMargins(0, 0, 0, ScreenUtil.dip2px(mContext, 100));


嵌套NestListView不置顶问题 同时

在ScrollView上添加 android:focusable="true" android:focusableInTouchMode="true"

代码中添加 svScroll.fullScroll(View.FOCUS_UP);


ScrollView动态设置margin

RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) svScroll.getLayoutParams(); layoutParams.setMargins(0, 0, 0, ScreenUtil.dip2px(mContext, 48));

最近更新:: 2025/10/22 15:36
Contributors: luokaiwen