gpt4 book ai didi

Android:Shape "corners"问题。这是一个错误吗?

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:00:52 24 4
gpt4 key购买 nike

我在玩转角,我对这种行为很感兴趣。 XML 布局:

<TextView xmlns:android="http://schemas.android.com/apk/res/android"  
android:id="@+id/list_header_title"

android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:padding="10dip"
android:gravity="center_vertical"

android:background="@layout/my_outline"

android:text="Example"
android:textSize="14sp"
android:textStyle="bold"

/>

这是 my_outline.xml:(注意 corners 标签)

<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">

<corners
android:topLeftRadius="10dip"
android:bottomRightRadius="10dip"/>

<padding
android:left="50dip"
android:top="5dip"
android:bottom="5dip" />

<solid
android:color="#0fff" />

<stroke
android:width="1dip"
android:color="#f0f0f0" />

</shape>

图片:

enter image description here

将形状更改为:

<corners
android:topLeftRadius="10dip"
android:bottomLeftRadius="10dip"/>

而且您可以清楚地看到底角是倒置的(所有人都这样,我删掉“星期三”只是为了说明)。这是我手机的照片(Nexus S 2.3.2,但也发生在模拟器上):

enter image description here

你知道吗?我查看了谷歌(“android shape inverted corner”),但一无所获。这里也没有“相关问题”。

最佳答案

是的,这是一个值得注意的错误。参见 this answer更多链接和引用信息。 :P

关于Android:Shape "corners"问题。这是一个错误吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5735221/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com