title: Cannot make a static reference to the non-static method setImageBitmap(Bitmap) from the type ImageView
body: <h2>ISSUE:</h2>
  
  <p>I'm getting an error in eclipse stating `Cannot make a static reference to the non-static method setImageBitmap(Bitmap) from the type ImageView </p>
  
  <h2>SOURCE:</h2>
  
  <pre><code>public class Home extends YouTubeBaseActivity implements
  YouTubePlayer.OnInitializedListener,
  YouTubeThumbnailView.OnInitializedListener {
  
      public static final String API_KEY = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
      public static final String VIDEO_ID = "o7VVHhK9zf0";
      public static final String VIDEO1_ID = "xVHHJqntuXI";
      public static final String VIDEO2_ID = "YWteQj_q3Ro";
      public static final String VIDEO3_ID = "83ZgtqTw-mI";
      public static final String VIDEO4_ID = "n5wMza29JwI";
      private YouTubePlayer youTubePlayer;
      private YouTubePlayerView youTubePlayerView;
      private YouTubeThumbnailView youTubeThumbnailView1;
      private YouTubeThumbnailView youTubeThumbnailView2;
      private YouTubeThumbnailView youTubeThumbnailView3;
      private YouTubeThumbnailView youTubeThumbnailView4;
      private String[] drawerListViewItems;
      private DrawerLayout drawerLayout;
      private DrawerLayout mDrawerLayout;
      private ListView drawerListView;
      private ListView mDrawerList;
      private ActionBarDrawerToggle actionBarDrawerToggle;
      private ActionBarDrawerToggle mDrawerToggle;
      Drawable selstation_up_btn; 
      private YouTubeThumbnailLoader youTubeThumbnailLoader;
      ScrollView mainScrollView;
      Button fav_up_btn1;
      Button fav_dwn_btn1;
      ArrayAdapter adapter;
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.home);
  
          ViewPager viewPager = (ViewPager) findViewById(R.id.view_pager);
          ImagePagerAdapter adapter = new ImagePagerAdapter();
          viewPager.setAdapter(adapter);
  
  final ActionBar actionBar = getActionBar();
  actionBar.setCustomView(R.layout.actionbar_custom_view_home);
  actionBar.setDisplayShowTitleEnabled(false);
  actionBar.setDisplayShowCustomEnabled(true);
  
  
  Drawable d = getResources().getDrawable(selstation_up_btn);
  imageView.setImageBitmap(((BitmapDrawable) d).getBitmap());
  </code></pre>
  
  <h2>CITATION / EXAMPLE SOURCE / INITIAL ISSUE:</h2>
  
  <p><a href="https://stackoverflow.com/questions/20229433/footer-image-will-not-size-correctly">Footer Image Will Not Size Correctly</a></p>
  
  <h2>EDIT (In Response to Ramaral)</h2>
  
  <pre><code>public class Home extends YouTubeBaseActivity implements
  YouTubePlayer.OnInitializedListener,
  YouTubeThumbnailView.OnInitializedListener {
  
      public static final String API_KEY = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
      public static final String VIDEO_ID = "o7VVHhK9zf0";
      public static final String VIDEO1_ID = "xVHHJqntuXI";
      public static final String VIDEO2_ID = "YWteQj_q3Ro";
      public static final String VIDEO3_ID = "83ZgtqTw-mI";
      public static final String VIDEO4_ID = "n5wMza29JwI";
      private YouTubePlayer youTubePlayer;
      private YouTubePlayerView youTubePlayerView;
      private YouTubeThumbnailView youTubeThumbnailView1;
      private YouTubeThumbnailView youTubeThumbnailView2;
      private YouTubeThumbnailView youTubeThumbnailView3;
      private YouTubeThumbnailView youTubeThumbnailView4;
      private String[] drawerListViewItems;
      private DrawerLayout drawerLayout;
      private DrawerLayout mDrawerLayout;
      private ListView drawerListView;
      private ListView mDrawerList;
      private ActionBarDrawerToggle actionBarDrawerToggle;
      private ActionBarDrawerToggle mDrawerToggle;
      Drawable selstation_up_btn; 
      ImageView imageView;
      private YouTubeThumbnailLoader youTubeThumbnailLoader;
      ScrollView mainScrollView;
      Button fav_up_btn1;
      Button fav_dwn_btn1;
      ArrayAdapter adapter;
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.home);
  
          ViewPager viewPager = (ViewPager) findViewById(R.id.view_pager);
          ImagePagerAdapter adapter = new ImagePagerAdapter();
          viewPager.setAdapter(adapter);
  
  final ActionBar actionBar = getActionBar();
  actionBar.setCustomView(R.layout.actionbar_custom_view_home);
  actionBar.setDisplayShowTitleEnabled(false);
  actionBar.setDisplayShowCustomEnabled(true);
  
  
  ImageView myImageView = (ImageView) findViewById(R.id.selstation_up_btn);
  Drawable d = getResources().getDrawable(R.drawable.selstation_up_btn);
  imageView.setImageDrawable(d);  
  </code></pre>
  
  <h2>ISSUE AFTER EDIT (In Response to Ramaral)</h2>
  
  <pre><code>12-02 10:28:23.619: E/AndroidRuntime(24278): FATAL EXCEPTION: main
  12-02 10:28:23.619: E/AndroidRuntime(24278): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.idg2/com.idg.omv.Home}: java.lang.NullPointerException
  12-02 10:28:23.619: E/AndroidRuntime(24278):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2110)
  12-02 10:28:23.619: E/AndroidRuntime(24278):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2135)
  12-02 10:28:23.619: E/AndroidRuntime(24278):    at android.app.ActivityThread.access$700(ActivityThread.java:143)
  12-02 10:28:23.619: E/AndroidRuntime(24278):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1241)
  12-02 10:28:23.619: E/AndroidRuntime(24278):    at android.os.Handler.dispatchMessage(Handler.java:99)
  12-02 10:28:23.619: E/AndroidRuntime(24278):    at android.os.Looper.loop(Looper.java:137)
  12-02 10:28:23.619: E/AndroidRuntime(24278):    at android.app.ActivityThread.main(ActivityThread.java:4950)
  12-02 10:28:23.619: E/AndroidRuntime(24278):    at java.lang.reflect.Method.invokeNative(Native Method)
  12-02 10:28:23.619: E/AndroidRuntime(24278):    at java.lang.reflect.Method.invoke(Method.java:511)
  12-02 10:28:23.619: E/AndroidRuntime(24278):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1004)
  12-02 10:28:23.619: E/AndroidRuntime(24278):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:771)
  12-02 10:28:23.619: E/AndroidRuntime(24278):    at dalvik.system.NativeStart.main(Native Method)
  12-02 10:28:23.619: E/AndroidRuntime(24278): Caused by: java.lang.NullPointerException
  12-02 10:28:23.619: E/AndroidRuntime(24278):    at com.idg.omv.Home.onCreate(Home.java:89)
  12-02 10:28:23.619: E/AndroidRuntime(24278):    at android.app.Activity.performCreate(Activity.java:5179)
  12-02 10:28:23.619: E/AndroidRuntime(24278):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)
  12-02 10:28:23.619: E/AndroidRuntime(24278):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2074)
  12-02 10:28:23.619: E/AndroidRuntime(24278):    ... 11 more
  </code></pre>