Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7850615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T18:55:01+00:00 2026-06-02T18:55:01+00:00

i am fetching the itemname,itemimage,price and desc from server database to android mobile in

  • 0

i am fetching the itemname,itemimage,price and desc from server database to android mobile in custom lisview. i am placed checkbox in custom listview. I am selected some items in custom listview . now i want to display those selected itemimages to another page .. please give solution

             i try this code

            public class test extends BaseAdapter {
public Context Context;
  String qrimage;
  Bitmap bmp, resizedbitmap;
  Bitmap[] bmps;
  Activity activity = null;
  private LayoutInflater inflater;

  private ImageView[] mImages;
  String[] itemimage;
  TextView[] tv;  
  String itemname,price,desc;
  String[] itemnames;
  String[] prices;
  String[] descs;
  HashMap<String, String> map = new HashMap<String, String>();

  public Appetizerlist(Context context, JSONArray imageArrayJson) {
      Context=context;
    //inflater = (LayoutInflater)activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    //  imageLoader=new ImageLoader(activity);
    inflater=LayoutInflater.from(context);
    this.mImages = new ImageView[imageArrayJson.length()];
    this.bmps = new Bitmap[imageArrayJson.length()];
    this.itemnames = new String[imageArrayJson.length()];
    this.prices=new String[imageArrayJson.length()];
    this.descs=new String[imageArrayJson.length()];
    try {

      for (int i = 0; i < imageArrayJson.length(); i++) {
        JSONObject image = imageArrayJson.getJSONObject(i);
        qrimage = image.getString("itemimage");
        itemname = image.getString("itemname");
        price=image.getString("price");
        desc=image.getString("itemdesc");

        itemnames[i] = itemname;
        prices[i]=price;
       descs[i]=desc;


        byte[] qrimageBytes = Base64.decode(qrimage.getBytes());

        bmp = BitmapFactory.decodeByteArray(qrimageBytes, 0,
                                            qrimageBytes.length);
        int width = 100;
        int height = 100;
        resizedbitmap = Bitmap.createScaledBitmap(bmp, width, height,
                                                  true);
        bmps[i] = bmp;

        mImages[i] = new ImageView(context);
        mImages[i].setImageBitmap(resizedbitmap);

        mImages[i].setScaleType(ImageView.ScaleType.FIT_START);


        // tv[i].setText(itemname);
      }
      System.out.println(map);

    } catch (Exception e) {
      // TODO: handle exception
    }
  }

  public int getCount() {
    return mImages.length;
  }

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

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




  public View getView(int position, View convertView, ViewGroup parent) {
        View view = convertView;
        final ViewHolder viewHolder;
        if (view == null) {         
              view = inflater.inflate(R.layout.appetiserlistview, null);
            viewHolder = new ViewHolder();
            viewHolder.image=(ImageView)view.findViewById(R.id.appetiserimage);
            viewHolder.text = (TextView) view.findViewById(R.id.appetisertext);
            viewHolder.desc=(TextView)view.findViewById(R.id.appetiserdesc);
            viewHolder.price=(TextView)view.findViewById(R.id.appetiserdesc);
            viewHolder.checkbox = (CheckBox) view.findViewById(R.id.bcheck);


            view.setTag(viewHolder);
        } else {
            viewHolder = (ViewHolder) view.getTag();
        }
        viewHolder.image.setImageBitmap(bmps[position]);

        viewHolder.price.setText(prices[position]);
        viewHolder.desc.setText(descs[position]);
        viewHolder.checkbox.setTag(itemnames[position]);
        ViewHolder holder = (ViewHolder) view.getTag();
        holder.text.setText(itemnames[position]);

        return view;
    }

    static class ViewHolder {
    protected TextView text,price,desc;
    protected ImageView image;
    protected CheckBox checkbox;
}



} 

i want display selected itemimages to the next page.. please help me

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T18:55:05+00:00Added an answer on June 2, 2026 at 6:55 pm

    you can use OnItemClickListener() to pass this image String qrimage = image.getString("itemimage"); to your new Activity using intent.putExtra("qrimage",qrimage); and Decode this string in your New Activity as you have done this in your ListView.

    If there is an array of images use ArrayList to store every image and pass the arrayList to intent using intent.putStringArrayListExtra("arrImages", bmps); and get it in another Activity using

    Intent i = getIntent();  
    arrImages = i.getStringArrayListExtra("arrImages");
    

    Hope it Helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am fetching an array which displays itemimage, itemname, price, qty in a custom
I am fetching some comments from the database in DESC from 0,15 - 15,15
I am fetching data from MySql database to solr server, my point is can
I am fetching some questions from the server (database) and showing it to client
I am fetching the itemnames from database and append to the edittext (only one
I am fetching the datas from the database...And the datas are displayed as dropdownmenu
I am fetching lots of thumbnails from a remote server and displaying them in
Im fetching an array from my sql database, but the string has spaces in
When fetching content from a database using activerecord, I would like to fetch a
I am fetching some data from database and want to show these values in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.