I'm using Universal Image Loader and i want to blur the images.I was thinking about creating a class that i could use in xml to create the view ..something like :
<folder.classblur..
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/coverImageViewFavorites"
android:src="@drawable/bg_empty_player"
/> instead of <ImageView...
This is my main class (a part of it )
public class Photos
{
private ImageLoader imageLoader;
private ImageView coverView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
imageLoader = ImageLoader.getInstance();
coverView = (ImageView) findViewById(R.id.coverImageViewFavorites);
Track track = traksList.get(trackPosition);
imageLoader.displayImage(track.getArtworkUrl().replace("-large", "-crop"),coverView);
}
}
xml file:
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<ImageView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/coverImageViewFavorites"
android:src="@drawable/bg_empty_player"
/>
</RelativeLayout>