国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統(tǒng) > Android > 正文

Android 中ScrollView與ListView沖突問題的解決辦法

2019-10-22 18:26:38
字體:
來源:轉載
供稿:網(wǎng)友

Android 中ScrollView與ListView沖突問題的解決辦法

自定義MyListView

public class MyListView extends ListView {   public MyListView(Context context)   {     super(context);     // TODO Auto-generated constructor stub   }    public MyListView(Context context, AttributeSet attrs)   {     super(context, attrs);     // TODO Auto-generated constructor stub   }    public MyListView(Context context, AttributeSet attrs, int defStyle)   {     super(context, attrs, defStyle);     // TODO Auto-generated constructor stub   }    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec)   {     int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST);     super.onMeasure(widthMeasureSpec, expandSpec);   } } 

在xml布局中直接用MyListView替換ListView即可使用

如有疑問請留言或者到本站社區(qū)交流討論,感謝閱讀,希望能幫助到大家,謝謝大家對本站的支持!


注:相關教程知識閱讀請移步到Android開發(fā)頻道。
發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 武功县| 中牟县| 岑巩县| 田阳县| 西乌| 揭东县| 黔南| 恭城| 汝南县| 安多县| 柘城县| 曲松县| 阜宁县| 嘉黎县| 遂溪县| 永修县| 安新县| 澄迈县| 星子县| 松溪县| 和静县| 遵义县| 文成县| 富川| 和林格尔县| 娄烦县| 稻城县| 伊通| 苍梧县| 阆中市| 松潘县| 城步| 札达县| 兴义市| 翁牛特旗| 宁城县| 安仁县| 象山县| 东安县| 平昌县| 崇左市|