如何解决不同屏幕的GridLayout呈现方式不同
我已经面对这个问题已有一段时间了,我不知道为什么会这样。在三种不同的屏幕尺寸上,呈现相同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 举报,一经查实,本站将立刻删除。