android - Wallpaper not scaling correctly when placing it as activity backgroung -
i have custom .png image set android device's wallpaper.
as understand it, wallpaper size should 960x800 pixels android device present middle part of image , right , left parts when scroll right , left on screen. i’ve taken small image want in center of screen (350x350) , filled rest of image black surrounding.
my problem is: have activity in application needs background similar wallpaper (to imitate blank activity textview presented on it). i’m using code so:
private wallpapermanager wallpapermanager; private drawable wallpaperdrawable; private relativelayout rtemp; rtemp = (relativelayout)findviewbyid(r.id.temp_layout); wallpapermanager = wallpapermanager.getinstance(this); wallpaperdrawable = wallpapermanager.getdrawable(); rtemp.setbackground(wallpaperdrawable);
but screen appears have wallpaper whole , not middle part anymore (it shrink down image) , not consistent regular wallpaper anymore.
are there suggestions on how solve it? there way avoid image shrinking on activity or there way make image not spread wallpaper screen?
thanx lot!
better use framelayout contains both relativelayout on imageview. imageview gives options scale image & furthermore customization.
Comments
Post a Comment