title: java.lang.OutOfMemoryError in my android application
body: <p>I have 18 images which create a flower when overlap eachother as a stack in my and app. All images are added to activity in XML file <code>android:src:'@drawable/blabla..'</code>... However when I run my app , it returns an error <code>java.lang.OutOfMemoryError</code> .Please help me... I dont know how I can solve this problem.Thank you...</p>
  
  <pre><code>public class PapatyaFaliActivity extends Activity {
       private int[] startLeafID={R.id.imag,R.id.birstart,R.id.ikistart,R.id.ucstart,R.id.dortstart,R.id.besstart,R.id.altistart,R.id.yedistart,
          R.id.sekizstart,R.id.dokuzstart,R.id.onstart,R.id.onbirstart,R.id.onikistart,R.id.onucstart,R.id.ondortstart,R.id.onbesstart,R.id.onaltistart};
      private ImageView[] leafstart=new ImageView[17];
      private int[] leafResouseID={R.drawable.papatya_orta,R.drawable.leaf_1,R.drawable.leaf_2,R.drawable.leaf_3,R.drawable.leaf_4,R.drawable.leaf_5,R.drawable.leaf_6,
          R.drawable.leaf_7,R.drawable.leaf_8,R.drawable.leaf_9,R.drawable.leaf_10,R.drawable.leaf_11,R.drawable.leaf_12,R.drawable.leaf_13,
          R.drawable.leaf_14,R.drawable.leaf_15,R.drawable.leaf_16};
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
  
          for(int i=0;i&lt;17;i++){
              leafstart[i]=(ImageView) findViewById(startLeafID[i]);
          }
          for(int i=0;i&lt;17;i++){
              leafstart[i].setImageResource(leafResouseID[i]);
          }
  
          Thread timerThread=new Thread(){
              @Override
              public void run() {
                  try {
                      sleep(2000);
  
                  } catch (Exception e) {
                      e.printStackTrace();
                  }finally{
                      Intent menuIntent=new Intent(getBaseContext(),MenuFrame.class);
                      startActivity(menuIntent);
                  }
              }
  
          };
          timerThread.start();
      }
      @Override
      protected void onPause() {
          super.onPause();
          for(int i=0;i&lt;17;i++){
              leafstart[i].setImageResource((Integer) null);
          }
          finish();
      }
  }
  </code></pre>