i need to show images in layout but only using view tag not image view tag in android studio.but i have already use background tag for oval shape?
            Asked
            
        
        
            Active
            
        
            Viewed 34 times
        
    0
            
            
        - 
                    What's wrong with `ImageView`? If you'd explain it less abstract, it might be easier to answer. – Martin Zeitler Oct 13 '19 at 19:30
- 
                    Look into LayerList. https://stackoverflow.com/questions/21002224/add-a-background-image-to-shape-in-xml-android – einUsername Oct 13 '19 at 19:34
- 
                    martin zeitler its a assignment that use only view tag for oval images and repeat it with recycler view. – Adeel Ahmad Oct 13 '19 at 19:35
- 
                    qwerty its helpful to understand how to demonstrate for my use.thanks – Adeel Ahmad Oct 13 '19 at 19:38
1 Answers
0
            
            
        I don't know your use case because you didn't post any code. ;-) Delete the solid to make the oval transparent. Move the item (oval/image) which you would like to be in the background to the first position. Try this xml for your drawable.xml:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:drawable="@drawable/ic_launcher_background"/>
    <item>
        <shape android:shape="oval">
            <solid android:color="@color/colorAccent"/>
        </shape>
    </item>
</layer-list>
 
    
    
        Sachin Tyagi
        
- 2,814
- 14
- 26
 
    
    
        einUsername
        
- 1,569
- 2
- 15
- 26
