Home Clip corners of a bitmap on xml android
Reply: 0

Clip corners of a bitmap on xml android

mohammad
1#
mohammad Published in 2018-02-14 10:00:53Z

I want to put a bitmap in background of a shape. I use layer-list for this:

<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:drawable="@drawable/background" />
    <item>
        <shape
            android:layout_height="wrap_content"
            android:shape="rectangle">
            <stroke
                android:width="2dp"
                android:color="#ff0000" />
            <corners android:radius="10dp" />
        </shape>
    </item>
</layer-list>

The result is:

As you can see corners of bitmap is visible. How can I remove these corners?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.329278 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO