Start new thred from asynk task in android
<p>In my application i made service call to fetch images from server.For this i have used asynk task class.For image loading I'm using lazy loading.Now the problem is,when i make call for loading images from background method of asynk task then the screen becomes blank for some time and then i see the progress bar.When i made trace for it i found out that i should start image loading in a new thread.So i want to know how to start a new thread within asynk task background method.Please help me..I'm new to this.Below is my code..</p>

<pre><code>public class GetRestaurentDetails extends AsyncTask&lt;Object, Object, Object&gt;
{

    Context context;
    ProgressDialog progressDialog;


    public GetRestaurentDetails(Context c) {
        this.context=c;

    }
    @Override
    protected void onPreExecute() {
        super.onPreExecute();


        this.progressDialog=ProgressDialog.show(context,"","Please wait...");

    }
    @Override
    protected Object doInBackground(Object... params) {

        onGetRestaurentDetails();
        listAdapter = new RestaurantLidtAdapter(arrImages);
        setListAdapter(listAdapter);

        return null;
    }


    @Override
    protected void onPostExecute(Object result) {
        super.onPostExecute(result);


        progressDialog.dismiss();

    }

}
</code></pre>

<p>And Adapter class</p>

<pre><code>private class RestaurantLidtAdapter extends BaseAdapter{
    Holder holder = null;
    LayoutInflater inflater;
    ImageLoader imageLoader;
    public RestaurantLidtAdapter(ArrayList&lt;String&gt; arrImages){

        inflater = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        imageLoader=new ImageLoader(RestaurantListActivity.this);
    }

    @Override
    public int getCount() {

        return arrPromotions.size();
    }

    @Override
    public Object getItem(int position) {

        return position;
    }

    @Override
    public long getItemId(int position) {
        // TODO Auto-generated method stub
        return position;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        // TODO Auto-generated method stub


        if(convertView == null){

            holder = new Holder();
            convertView = (View)inflater.inflate(R.layout.restaurantlistrowlayout, parent, false);
            holder.imgArrowImage = (ImageView)convertView.findViewById(R.id.imgArrowInHotelList);
            holder.imgHotelImage = (ImageView)convertView.findViewById(R.id.rowHotelImage);
            holder.txtRestaurentPromotion = (TextView)convertView.findViewById(R.id.TextViewPromotions);
            holder.txtRestaurentName = (TextView)convertView.findViewById(R.id.TextViewRestaurentName);

            convertView.setTag(holder);
        }
        else
        {
            holder = (Holder)convertView.getTag();


        }

        //holder.imgHotelImage.setImageBitmap(loadBitmap(arrImages.get(position)));


        imageLoader.DisplayImage(arrImages.get(position), holder.imgHotelImage);
        holder.txtRestaurentPromotion.setText(arrPromotions.get(position));
        holder.txtRestaurentName.setText(arrRestaurentName.get(position));
        convertView.setTag(holder);
        return convertView;
    }



}
</code></pre>
