I have to place textview on Imageview and have to set as Wallpaper.
I am able to set the wallpaper with Textview place on Imageview but the Wallpaper is not stretching to phone screen. Below is the code I have used. Please provide a solution.
WallpaperManager wallpaperManager =WallpaperManager.getInstance(getBaseContext());
DisplayMetrics metrics = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(metrics);
int height = metrics.heightPixels;
int width = metrics.widthPixels;
Bitmap wallpaper = Bitmap.createScaledBitmap(bitmap1,width,height, true);
Canvas canvas = new Canvas(wallpaper);
imageView.draw(canvas);
textView.draw(canvas);
try {
wallpaperManager.setBitmap(wallpaper);
wallpaperManager.suggestDesiredDimensions(width,height);
}
catch (IOException e) {
Toast.makeText(FullImageActivity.this,
"Error setting wallpaper", Toast.LENGTH_SHORT)
.show();
}
The above code is setting the wallpaper but not covering the navigation menu bar located at the bottom. Please help me in this.