问题描述
我已经面对这个问题已有一段时间了,我不知道为什么会这样。在三种不同的屏幕尺寸上,呈现相同EditGrid的gridLayout的方式完全不同。
这是gridLayout中的示例EditText的XML。
<EditText
android:id="@+id/et00"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@drawable/border"
android:digits="123456789"
android:inputType="number|textMultiLine"
android:maxLength="1"
android:textAlignment="center"
android:textSize="25sp"
app:layout_column="0"
app:layout_columnWeight="0.11"
app:layout_row="0"
app:layout_rowWeight="0.11" />
``
border is an XML file in order to mark the boundaries. There are several such kind of XML files for different type of borders (Some cells need to have a darker border on the top for example),but this is the standard border where each boundary is of equal darkening.
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<!-- View background color -->
<solid
android:color="@color/colorWhite" >
</solid>
<stroke
android:width="0.1dp"
android:color="@color/colorBlack" >
</stroke>
</shape>`
The Images attached show how the rendering is different for each phone size
[Phone 1][1]
[Phone 2][2]
[Phone 3][3] (Worst offender)
Please advice.
[1]: https://i.stack.imgur.com/9GW3S.png
[2]: https://i.stack.imgur.com/BGaAp.png
[3]: https://i.stack.imgur.com/cNnou.png
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)