<linearLayout xmlns:tools="http://schemas.androID.com/tools" xmlns:androID="http://schemas.androID.com/apk/res/androID" tools:context=".LauncherActivity" androID:orIEntation="vertical" androID:layout_wIDth="fill_parent" androID:layout_height="fill_parent" > <ListVIEw androID:ID="@+ID/lvcalendar" androID:layout_wIDth="fill_parent" androID:layout_height="fill_parent" androID:clipTopadding="false" androID:fitsSystemwindows="true" androID:divIDerHeight="10dp" androID:paddingtop="10dp" androID:paddingBottom="10dp" androID:divIDer="#00ffffff" androID:scrollbarThumbVertical="@drawable/scrollbarstyle" androID:layout_gravity="top" androID:ListSelector="@androID:color/transparent" /></linearLayout>
活动主题包括:
<item name="androID:windowTranslucentStatus">true</item><item name="androID:windowTranslucentNavigation">true</item>
在Kitkat设备下,行为是我想要的:项目底部和顶部都有10dp填充.在kitkat设备上,paddingtop和paddingBottom似乎没有效果,因为ListVIEw的项目在顶部和底部没有10dp填充.
我认为问题出在androID:fitsSystemwindows中,因为这个属性似乎设置了必要的填充到视图,因为半透明的装饰,并使androID:padding *属性被忽略.
我的问题:无论如何,我可以将androID:fitsSystemwindows设置为true并仍然在视图上添加额外的填充?
解决方法 您应该将此属性添加到父视图:<linearLayoutxmlns:tools="http://schemas.androID.com/tools"xmlns:androID="http://schemas.androID.com/apk/res/androID"tools:context=".LauncherActivity"androID:fitsSystemwindows="true"androID:orIEntation="vertical"androID:layout_wIDth="fill_parent"androID:layout_height="fill_parent" >总结
以上是内存溢出为你收集整理的android – fitsSystemWindows和kitkat上的额外填充全部内容,希望文章能够帮你解决android – fitsSystemWindows和kitkat上的额外填充所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)