P. *_*wal 1 android android-imageview
图像视图背景仅反映在不在圆圈外的圆圈内.我尝试了很多东西但却做不到.有人请我.谢谢!!
.xml使用以下内容在drawable文件夹中创建一个文件:
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid
android:color="@color/black"/>
</shape>
Run Code Online (Sandbox Code Playgroud)
然后将此文件设置为您的背景.
圆.xml
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval" >
<size android:width="50dp"
android:height="50dp"/>
<stroke
android:width="3dp"
android:color="@color/black"/>
<solid android:color="@color/black"/>
</shape>
Run Code Online (Sandbox Code Playgroud)
在 ImageView 中添加这个
android:background="@drawable/circle"
Run Code Online (Sandbox Code Playgroud)
谢谢大家的帮助。这段代码正在按我想要的方式工作。谢谢你!!
| 归档时间: |
|
| 查看次数: |
5157 次 |
| 最近记录: |