我正在设置一个像这样的background图像LinearLayout:
1.back_xml:
<?xml version="1.0" encoding="UTF-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/back" >
</item>
<item>
<shape>
<solid/>
<stroke android:width="1dip" android:color="#225786" />
<corners android:radius="10dip"/>
<padding android:left="0dip" android:top="0dip" android:right="0dip" android:bottom="0dip" />
</shape>
</item>
Run Code Online (Sandbox Code Playgroud)
2. tile.xml
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/pie_chart_background"
android:tileMode="repeat">
</bitmap>
Run Code Online (Sandbox Code Playgroud)
我现在设置back.xml作为一个background以LinearLayout它工作正常.
我需要有一个image带圆角的边角以及它的边框.但我只有圆角的边框而不是图像我的代码中有什么问题我错过了什么?
这是我的图像的样子:

想象一下,我有一个矩形图像.我怎么能创建像下一个样式?

我的意思是,将图像裁剪成圆形,添加边框,阴影和粗糙/闪耀效果.到目前为止,我只尝试使用此代码片段来裁剪图像:在Android中从位图裁剪圆形区域,但仅此而已.我不知道如何在Android中执行其余组件.