【发布时间】:2020-12-29 06:42:41
【问题描述】:
我有浅棕色圆圈的 XML,我想把它作为背景放在左上角,如图所示
谁能指导我如何做到这一点?我需要在不同侧面的多个屏幕上显示它。任何提示将不胜感激
这是circle的XML
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="oval">
<solid android:color="@color/light_brown"/>
<!-- Set the same value for both width and height to get a circular shape -->
<size android:width="550sp" android:height="550sp"/>
</shape>
</item>
</selector>
【问题讨论】:
-
如果您已经准备好 xml,只需将其添加到视图的背景中。这有什么问题?
-
@ADM 我有完整圆圈的 xml,但我应该在左上角显示一半圆圈,如图所示
标签: android android-xml android-drawable