title: Not all but some android devices give bitmap size exceeds 32 bits error
body: <p>I'm fetching informations and Images from urls with Json(decode) and show them with <code>CustomListviewAdapter</code>, but i have a incomprehensible problem, i couldnt find the solution. I dont get any error(my emulators and phone) but some phones is giving <code>bitmap size exceeds 32 bits error</code>. I have to solve this problem because my app is on the google play market.</p>
  
  <p>By the way I'm using urlimageviewhelper library to show image from url and using lazy loading.
   Hope you can help me. Thanks in advance.</p>
  
  <p><strong>Here are the codes</strong></p>
  
  <pre><code>    @Override
      protected void onPostExecute(String result) {
          super.onPostExecute(result);
          try {
  
              JSONArray jsonResponse = new JSONArray(result);
              asd = new String[3][jsonResponse.length()];
              rowItems = new ArrayList&lt;RowItem&gt;();
  
              for (int i = 0; i &lt; jsonResponse.length(); i++) {
                  JSONObject js = jsonResponse.getJSONObject(i);
                  asd[0][i] = js.getString("Category_Name");
                  asd[2][i] = js.getString("Image");
                  asd[1][i] = js.getString("Term_ID");
  
                  RowItem item = new RowItem(asd[2][i], asd[0][i], asd[1][i]);
                  rowItems.add(item);
              }
  
  
              adapter = new CustomListViewAdapter(MainActivity.this,
                      R.layout.list_item, rowItems);
  
              listView.setAdapter(adapter);
  
  
  
          } catch (JSONException e) {
              e.printStackTrace();
          }
  
      }
  
  }
  </code></pre>
  
  <p><strong>RowItem class</strong></p>
  
  <pre><code>public class RowItem&lt;T&gt; {
  private String imageId;
  private String title;
  private String desc;
  
  public RowItem(String imageId, String title, String desc) {
      this.imageId = imageId;
      this.title = title;
      this.desc = desc;
  }
  public String getImageId() {
      return imageId;
  }
  public void setImageId(String imageId) {
      this.imageId = imageId;
  }
  public String getDesc() {
      return desc;
  }
  public void setDesc(String desc) {
      this.desc = desc;
  }
  public String getTitle() {
      return title;
  }
  public void setTitle(String title) {
      this.title = title;
  }
  
  @Override
  public String toString() {
      return title + "\n" + desc;
  }
  }   
  </code></pre>
  
  <p><strong>CustomListViewAdapter class</strong></p>
  
  <pre><code>  public class CustomListViewAdapter extends ArrayAdapter&lt;RowItem&gt; {
  Context context;
  Boolean isInternetPresent = false;
  public CustomListViewAdapter(Context context, int resourceId,
          List&lt;RowItem&gt; items) {
      super(context, resourceId, items);
      this.context = context;
  }
  
  /* private view holder class */
  private class ViewHolder {
      ImageView imageView;
      TextView txtTitle;
      TextView txtDesc;
  }
  
  public View getView(int position, View convertView, ViewGroup parent) {
      ViewHolder holder = null;
      RowItem rowItem = getItem(position);
  
      LayoutInflater mInflater = (LayoutInflater) context
              .getSystemService(Activity.LAYOUT_INFLATER_SERVICE);
      if (convertView == null) {
          convertView = mInflater.inflate(R.layout.list_item, null);
          holder = new ViewHolder();
          holder.txtDesc = (TextView) convertView.findViewById(R.id.desc);
          holder.txtTitle = (TextView) convertView.findViewById(R.id.title);
          holder.imageView = (ImageView) convertView.findViewById(R.id.icon);
          convertView.setTag(holder);
      } else
          holder = (ViewHolder) convertView.getTag();
  
      holder.txtTitle.setText(rowItem.getTitle());
  
      ImageView img = (ImageView) convertView.findViewById(R.id.icon);
      ImageView gif = (ImageView) convertView.findViewById(R.id.icon);
  
      Ion.with(gif).load("http://www.example.com/wp-content/uploads/2014/03/android-icon/loading.gif");
      Drawable drawable=gif.getDrawable();
      UrlImageViewHelper.setUrlDrawable(img, rowItem.getImageId(),drawable,
              600000);
      return convertView;
  }
  }
  </code></pre>
  
  <p><strong>Error Log</strong></p>
  
  <pre><code>java.lang.IllegalArgumentException: bitmap size exceeds 32bits
  at android.graphics.Bitmap.nativeCreate(Native Method)
  at android.graphics.Bitmap.createBitmap(Bitmap.java:809)
  at android.graphics.Bitmap.createBitmap(Bitmap.java:769)
  at android.view.View.buildDrawingCache(View.java:13649)
  at android.view.View.getDisplayList(View.java:13379)
  at android.view.View.getDisplayList(View.java:13445)
  at android.view.View.draw(View.java:14223)
  at android.view.ViewGroup.drawChild(ViewGroup.java:3118)
  at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2955)
  at android.view.View.getDisplayList(View.java:13398)
  at android.view.View.getDisplayList(View.java:13445)
  at android.view.View.draw(View.java:14223)
  at android.view.ViewGroup.drawChild(ViewGroup.java:3118)
  at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2955)
  at android.view.View.getDisplayList(View.java:13398)
  at android.view.View.getDisplayList(View.java:13445)
  at android.view.View.draw(View.java:14223)
  at android.view.ViewGroup.drawChild(ViewGroup.java:3118)
  at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2955)
  at android.view.View.getDisplayList(View.java:13398)
  at android.view.View.getDisplayList(View.java:13445)
  at android.view.View.draw(View.java:14223)
  at android.view.ViewGroup.drawChild(ViewGroup.java:3118)
  at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2955)
  at android.view.View.getDisplayList(View.java:13398)
  at android.view.View.getDisplayList(View.java:13445)
  at android.view.View.draw(View.java:14223)
  at android.view.ViewGroup.drawChild(ViewGroup.java:3118)
  at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2955)
  at android.view.View.getDisplayList(View.java:13398)
  at android.view.View.getDisplayList(View.java:13445)
  at android.view.View.draw(View.java:14223)
  at android.view.ViewGroup.drawChild(ViewGroup.java:3118)
  at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2955)
  at android.view.View.getDisplayList(View.java:13398)
  at android.view.View.getDisplayList(View.java:13445)
  at android.view.View.draw(View.java:14223)
  at android.view.ViewGroup.drawChild(ViewGroup.java:3118)
  at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2955)
  at android.view.View.getDisplayList(View.java:13398)
  at android.view.View.getDisplayList(View.java:13445)
  at android.view.View.draw(View.java:14223)
  at android.view.ViewGroup.drawChild(ViewGroup.java:3118)
  at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2955)
  at android.view.View.getDisplayList(View.java:13398)
  at android.view.View.getDisplayList(View.java:13445)
  at android.view.View.draw(View.java:14223)
  at android.view.ViewGroup.drawChild(ViewGroup.java:3118)
  at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2955)
  at android.view.View.draw(View.java:14509)
  at android.widget.FrameLayout.draw(FrameLayout.java:472)
  at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2452)
  at android.view.View.getDisplayList(View.java:13403)
  at android.view.View.getDisplayList(View.java:13445)
  at     android.view.HardwareRenderer$GlRenderer.buildDisplayList(HardwareRenderer.java:1570)
  at android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:1449)
  at android.view.ViewRootImpl.draw(ViewRootImpl.java:2431)
  at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2301)
  at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1931)
  at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1047)
  at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5896)
  at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761)
  at android.view.Choreographer.doCallbacks(Choreographer.java:574)
  at android.view.Choreographer.doFrame(Choreographer.java:544)
  at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747)
  at android.os.Handler.handleCallback(Handler.java:733)
  at android.os.Handler.dispatchMessage(Handler.java:95)
  at android.os.Looper.loop(Looper.java:136)
  at android.app.ActivityThread.main(ActivityThread.java:5105)
  at java.lang.reflect.Method.invokeNative(Native Method)
  at java.lang.reflect.Method.invoke(Method.java:515)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:792)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:608)
  at dalvik.system.NativeStart.main(Native Method)
  </code></pre>