
<?xml version="1.0" enCoding="utf-8"?><FrameLayout xmlns:androID="http://schemas.androID.com/apk/res/androID" androID:orIEntation="vertical" androID:layout_wIDth="match_parent" androID:layout_height="wrap_content" androID:layout_marginleft="50dp" androID:background="#77cc99" > <FrameLayout androID:layout_wIDth="match_parent" androID:layout_height="wrap_content" androID:layout_marginleft="50dp" androID:background="#eebbaa"> <TextVIEw androID:layout_wIDth="fill_parent" androID:layout_height="wrap_content" androID:text="Hello World,MyActivity" /> </FrameLayout></FrameLayout>解决方法 默认情况下,对于FrameLayout,androID:layout_gravity属性设置为“left”.如果你想使用androID:layout_marginleft你应该改变它:
<?xml version="1.0" enCoding="utf-8"?><FrameLayout xmlns:androID="http://schemas.androID.com/apk/res/androID" androID:layout_wIDth="match_parent" androID:layout_height="wrap_content" androID:layout_gravity="top" androID:layout_marginleft="50dp" androID:background="#77cc99" androID:orIEntation="vertical" > <FrameLayout androID:layout_wIDth="match_parent" androID:layout_height="wrap_content" androID:layout_gravity="top" androID:layout_marginleft="50dp" androID:background="#eebbaa" > <TextVIEw androID:layout_wIDth="fill_parent" androID:layout_height="wrap_content" androID:text="Hello World,MyActivity" /> </FrameLayout></FrameLayout>总结
以上是内存溢出为你收集整理的当在FrameLayout中查看时,layout_marginLeft在Android API <11上正常工作全部内容,希望文章能够帮你解决当在FrameLayout中查看时,layout_marginLeft在Android API <11上正常工作所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)