FILL_PARENT无效的问题
public ScrollLayout(Context context, AttributeSet attrs) {
super(context, attrs);
Scroller = new Scroller(context);
setLayoutParams(new ViewGroup.LayoutParams(
ViewGroup.LayoutParams.WRAP_CONTENT,
ViewGroup.LayoutParams.FILL_PARENT));
}
这里我写了一个类 ScrollLayout继承于ViewGroup,在包com.main下面.
然后我在布局文件里面
<com.main.ScrollLayout
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:scrollbars="vertical" android:scrollbarSize="0dip"
android:id="@+id/mScrollLayout" android:fadeScrollbars="false"
android:fadingEdge="none" android:fadingEdgeLength="0dip"
android:layout_weight="1" android:fillViewport="true">
</com.main.ScrollLayout>
无法全屏啊,有可以指教的吗? --------------------编程问答-------------------- ScrollLayout 这个可能已经全屏了,你可以加一个 背景颜色 验证一下。 --------------------编程问答-------------------- 这个也有可能。不过还是要提醒 一下,一个界面最好不能用两个滚动组件存在,否则会出现一些奇怪的问题
补充:移动开发 , Android