i am creating a simple wallpaper app in which i have a image_view and a button.
image-view is showing a image, now what i want: i want to open image with wallpaper app on button click.
when i click button it should show all installed wallpaper app so i can choose any of them
to better understand see screenshot: this should happen when i click button
this is my code:
package com.example.wallpaper_test;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
public class WallpaperScreenActivity extends ActionBarActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.wallpaper_layout);
// image resource
ImageView img = (ImageView) findViewById(R.id.imageView1);
img.setImageResource(R.drawable.pop);
// call installed wallpaper app to set wallpaper on button click
Button b1 = (Button) findViewById(R.id.button1);
b1.setOnClickListener(new View.OnClickListener() {
public void onClick(View vx) {
}
});
}
}