Back to project page android-utils.
The source code is released under:
Apache License
If you think the Android project android-utils listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.omegar.android.utils.components; /*from w w w. j a v a 2 s .c om*/ import android.content.Context; import android.util.AttributeSet; import android.widget.ListView; public class NonScrollableListView extends ListView { public NonScrollableListView(Context context, AttributeSet attrs) { super(context, attrs); } @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { int heightSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST); super.onMeasure(widthMeasureSpec, heightSpec); getLayoutParams().height = getMeasuredHeight(); } }