android中网格布局组件溢出原因
问题描述:这是一个简单的网格布局应用,计算器界面,代码如下:
xml version= "1.0" encoding= "utf-8" ?>
< GridLayout xmlns: android = "http://schemas.android.com/apk/res/android"xmlns: tools = "http://schemas.android.com/tools"android :layout_width= "match_parent"android :layout_height= "match_parent"android :rowCount= "6"android :columnCount= "4"tools :context= "com.lifei.helloworld.TestGrid">< TextViewandroid:id= "@+id/t1"android:layout_width= "match_parent"android:layout_height= "wrap_content"android:textSize= "50sp"android:padding= "3pt"android:background= "#eee"android:textColor= "#000"android:text= "0" />
图形界面如下,可以看到,按钮一还在,但是其余的按钮在外面:
本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!
