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 7498773
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T19:35:33+00:00 2026-05-29T19:35:33+00:00

Hi I am trying to pass my ArrayList value into my TabLayout but I

  • 0

Hi I am trying to pass my ArrayList value into my TabLayout but I am getting null value please help me…I successfully passed my string value but ArrayList value only null…

here I am trying to pass my string and ArrayList value……….

this is my code:

sdcardImages.setOnItemClickListener(new OnItemClickListener() {


            public void onItemClick(AdapterView parent, View v, int position, long id) {
                Intent intent = new Intent(ParxmlActivity.this, tabview.class);
                intent.putExtra("spec",model_List.get(position).spec);
                intent.putExtra("mimage",model_List.get(position).mimage);
                intent.putStringArrayListExtra("imageList", model_List.get(position).imageList);

                startActivity(intent);  

            }
        });

the 1st and 2nd value working fine….spec and mimage but imageList only i am getting null value……

public class tabview extends TabActivity {
    Bundle tab_intent;
    public static String spec, mimage, imageList;
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.viewtab);
        tab_intent=tabview.this.getIntent().getExtras();
        spec=tab_intent.getString("spec");
        mimage = tab_intent.getString("mimage");
        imageList =  tab_intent.getString("imageList");

above code I am try to get my values the ImageList value only shows null what is the reason?

code:

package ml.ml;

import java.util.ArrayList;

import android.os.Parcel;
import android.os.Parcelable;

public class schild {
    public String name;
    public String model;
    public String spec;
    public String mimage;
    //public String imageList;
    //public String videoList;
    public ArrayList<String> imageList;
    public ArrayList<String> videoList;


    public schild(){
        name = new String();
        model = new String();
        spec = new String();
        mimage = new String();
        imageList = new ArrayList<String>();
        videoList = new ArrayList<String>();
        //imageList =new String();
        //videoList = new String();

    }


}

here I am adding to separate ArrayList

for(int j = 0; j<model_List.size(); j++){

                mname_List.add(model_List.get(j).name);
                mmimage.add(model_List.get(j).mimage);
                mspec_List.add(model_List.get(j).spec);
                mvideo_List.addAll(model_List.get(j).videoList);
                mmimage_List.addAll(model_List.get(j).imageList);
            }

this is value I am trying to passing in tab host…….

  • 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-05-29T19:35:38+00:00Added an answer on May 29, 2026 at 7:35 pm

    Change your tabview class:

    ArrayList<String> imageList;
    ...
    
    @Override
    public void onCreate(Bundle savedInstanceState) {
        ...
        imageList =  tab_intent.getStringArrayList("imageList");
        ...
    }
    

    Upd: You’re trying to take String from Bundle where is ArrayList<String> located.

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

Sidebar

Related Questions

Hi Im trying to pass an arraylist to a prepared statement but am getting
I'm trying to pass in a Base64 string into a C#.Net web application via
I'm trying to pass a null value for the first parameter in the code
Am trying to pass the selected check box value to the control function. Please
I am trying to pass a String argument to a ArrayList parameter like so:
Trying to pass a form value into a global var to be use in
im trying to pass two parameters to a function, i being an int value
I'm trying to pass some arguments into a new Powershell remoting session using the
Trying to pass some values into an imagebutton click event, something like this: <asp:ImageButton
Im trying to pass an array that I already found by a query into

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.