java - Setting Edges / Borders of ImageView Transparent Android -


i set edges of imageview transparent. know how set whole imageview transparent did in code below. however, there way can set only edges / border of image transparent? e.g. want 70% (the interior) of imageview normal while remaining 30% (the outside) should transparent. aim overlap 2 images (clouds , birds), can see birds "flying" around clouds while maintaing clouds original color.

public class firstactivity extends appcompatactivity {     imageview clouds;     imageview birds;      @override     protected void oncreate(bundle savedinstancestate)      {         super.oncreate(savedinstancestate);         setcontentview(r.layout.first_layout);          clouds = (imageview)findviewbyid(r.id.cloudview);         birds = (imageview)findviewby(r.id.birdview);          clouds.setimageresource(r.drawable.cloudsimage);         birds.setimageresource(r.drawable.birdsimage);          clouds.setalpha(0.5f);     } } 

would highly appreciate on matter!

my aim overlap 2 images (clouds , birds), can see birds "flying" around clouds while maintaing clouds original color

if background isn't necessary imageview can this:

<?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/clouds">  <imageview     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:src="@drawable/flying_bird"/>  </relativelayout> 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -