title: Set ImageView to a drawable (Android)
body: <p>Forgive me for being new to and my teminology may be incorrect:</p>
  
  <p>I have an array of images in class1, when an image is selected its id is passed to class2 (code below) I then display that image and give the option to set it as a wallpaper.  The problem is, using the code below I need the a drawable to assign the wallpaper, not ImageView.  Can someone give me some guidance in referencing the actual drawable where I have 
  "myWallpaperManager.setResource(need a drawable here);"</p>
  
  <p>Thanks in advance.  Hope this makes sense, as I said I am a noob!</p>
  
  <pre><code>public class FullWallView extends Activity {
  private Button wallbutton;
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.wallpaper_full);
  
      // get intent data
      Intent i = getIntent();
  
      // Selected image id
      int position = i.getExtras().getInt("id");
      ImageAdapter imageAdapter = new ImageAdapter(this);
  
      ImageView imageView = (ImageView) findViewById(R.id.full_wall_view);
      imageView.setImageResource(imageAdapter.mThumbIds[position]);
  
      //Making Button Clickable and setting the wallpaper
      wallbutton = (Button) findViewById(R.id.apply);
      wallbutton.setOnClickListener(new Button.OnClickListener()
      {
  
             @Override
             public void onClick(View arg0) {
              // TODO Auto-generated method stub
              WallpaperManager myWallpaperManager
               = WallpaperManager.getInstance(getApplicationContext());
              try {
                  myWallpaperManager.setResource(need a drawable here);
              } catch (IOException e) {
               // TODO Auto-generated catch block
               e.printStackTrace();
              }
  
             }});
  </code></pre>