【发布时间】:2014-08-25 08:09:25
【问题描述】:
我创建了一个椭圆形并将每个高度和宽度的大小设置为 56 像素。但我有一个椭圆形而不是圆形!当我将每个尺寸设置为 78 像素时,我得到了一个精确的圆圈!有人注意到或遇到过这个问题吗? 请解决!
clear_test.xml 这给了我一个椭圆形的形状!布局中不同的高度和宽度
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="#7caf00"/>
<size android:width="56px"
android:height="56px"/>
</shape>
calc_test.xml 但这给出了一个精确的圆圈
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="#7caf00"/>
<size android:width="78px"
android:height="78px"/>
</shape>
【问题讨论】:
-
邮政编码了解更多信息。
标签: android android-layout android-xml android-shape