Creating base adapter in my android application
<p>hi am doing an app regarding which show's listview ,listview is working but loading speed is to low.(its having 500 list items).am getting details from api.
thanks in advance</p>

<p>Hi manjunath,
this is my base adapter like this
private class EfficientAdapter extends BaseAdapter {
            private LayoutInflater mInflater;</p>

<pre><code>        public EfficientAdapter(Context context) {
            mInflater = LayoutInflater.from(context);
        }

        public int getCount() {
            Log.d("Msection lengtn.....:","mSectionname.length");

            return mSectionname.length;
        }

        public Object getItem(int position) {
            return position;
        }

        public long getItemId(int position) {
            return position;
        }

        public View getView(int position, View convertView, ViewGroup parent) {
            ViewHolder holder;
            if (convertView == null) {
                convertView = mInflater.inflate(R.layout.categoryexpand, null);
                holder = new ViewHolder();
                holder.image = (ImageView) convertView
                        .findViewById(R.id.imageView1);
                holder.text = (TextView) convertView.findViewById(R.id.text);
                holder.text3 = (TextView) convertView.findViewById(R.id.text2);
                convertView.setTag(holder);
            } else {
                holder = (ViewHolder) convertView.getTag();
            }
            try {

                holder.text.setText(mSectionname[position].toUpperCase());
                holder.text3.setText(mTitle[position]);
                holder.text3.setTypeface(Typeface.DEFAULT_BOLD);

                URL u1 = new URL("http://current.abrilemlondres.com.br" + mimageurl[position]);
            //  Log.d(TAG, "image url:" + u1);
                HttpURLConnection conn = (HttpURLConnection) u1.openConnection();

                conn.setDoInput(true);
                conn.connect();
                int length = conn.getContentLength();
                //Log.d(TAG, "image url length :" + length);
                InputStream is = conn.getInputStream();
                BufferedInputStream bis = new BufferedInputStream(is, 31960);
                BitmapFactory.Options opts = new BitmapFactory.Options();
                opts.inJustDecodeBounds = true;
                Bitmap bmImg = BitmapFactory.decodeStream(bis);
                holder.image.setImageBitmap(bmImg);
               } catch (Exception e) {

            }
            return convertView;
        }



        class ViewHolder {
            ImageView image;
            TextView text;
            TextView text3;

        }

    }
</code></pre>
