我想创建一个具有自定义形状的框架布局,并将其作为片段的容器。This is the image of the shape I need. The top-right corner and bottom-left corner has to be cut in which have to be placed two different icons. Also the border needs to be curved, there should be no cutting corners。我不知道该怎么做。
答案 0 :(得分:1)
在Drawable中创建XML文件
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@android:color/holo_red_dark" />
<stroke
android:width="1dp"
android:color="@android:color/white" />
然后,创建一个布局并将其放置在该布局的左下方,并提供背景颜色。
创建另一个布局并将其放置在右上角,并将边框颜色设置为“透明”