Android: Error in passing argument for Extras
<p>I tried to pass extras from one activity to another activity. I also have a class named Objects which holds the objects of the extras.</p>

<p>On my first activity, I wrote this:</p>

<pre><code> private OnClickListener top_listener = new OnClickListener() {
        public void onClick(View v) {
                    Intent top = new Intent(Main.this, TopProject.class);
                    Bundle b = new Bundle();
                    b.putParcelable("project_title", Objects);
                    startActivity(top);
        }
        };
</code></pre>

<p><strong>But there's a syntax error on this line: b.putParcelable("project_title", Objects); it said 'Objects' cannot be resolved to a variable. Should I declare something else first or what?</strong> Thank you</p>

<p>and this is my Objects Class:</p>

<pre><code>public class Objects implements Parcelable{

   String project_title = "project title";
   String organization_title = "organization title";
   String keyword = "keyword";
   String short_code = "short code";
   String project_description = "description";
   String smallImageUrl = "smallImageUrl";
   String bigImageUrl = "bigImageUrl";
   String price= "price";
   String country= "country";


    public static ArrayList&lt;Project&gt; projectsList = new ArrayList&lt;Project&gt;();

    public Objects(String project_title, String organization_title, String keyword, String short_code, String project_description, String smallImageUrl, String bigImageUrl, String price, String country) {
        this.project_title = project_title;
        this.organization_title = organization_title;
        this.keyword = keyword;
        this.short_code = short_code;
        this.project_description = project_description;
        this.smallImageUrl = smallImageUrl;
        this.bigImageUrl = bigImageUrl;
        this.price = price;
        this.country = country;

    }

     private Objects(Parcel parcel) {
            project_title = parcel.readString();
            organization_title = parcel.readString();
            keyword = parcel.readString();
            short_code = parcel.readString();
            project_description = parcel.readString();
            smallImageUrl = parcel.readString();
            bigImageUrl = parcel.readString();
            price = parcel.readString();
            country = parcel.readString();
            //projectsList = parcel.readList();
        }

    public int describeContents() {

        return 0;
    }

    public void writeToParcel(Parcel parcel, int flags) {
        parcel.writeString(project_title);
        parcel.writeString(organization_title);
        parcel.writeString(keyword);
        parcel.writeString(short_code);
        parcel.writeString(project_description);
        parcel.writeString(smallImageUrl);
        parcel.writeString(bigImageUrl);
        parcel.writeString(price);
        parcel.writeString(country);
        parcel.writeList(projectsList);
    }

    public String getProjectTitle(){
        return project_title;
    }

    public String getOrganizationTitle(){
        return organization_title;
    }

    public String getProjectDescription(){
        return project_description;
    }

    public String getKeyword(){
        return keyword;
    }

    public String getShortcode(){
        return short_code;
    }

    public String getSmallImageUrl(){
        return smallImageUrl;
    }

    public String getBigImageUrl(){
        return bigImageUrl;
    }

    public String getPrice(){
        return price;
    }

    public String getCountry(){
        return country;
    }

    public void setProjectTitle(String project_title){
        this.project_title = project_title;
    }

    public void setOrganizationTitle(String organization_title){
        this.organization_title = organization_title;
    }

    public void setProjectDescription(String project_description){
        this.project_description = project_description;
    }

    public void setKeyword(String keyword){
        this.keyword = keyword;
    }

    public void setShortcode(String short_code){
        this.short_code = short_code;
    }

    public void setSmallImageUrl(String smallImageUrl){
        this.smallImageUrl = smallImageUrl;
    }

    public void setBigImageUrl(String bigImageUrl){
        this.bigImageUrl = bigImageUrl;
    }

    public void setPrice(String price){
        this.price = price;
    }

    public void setCountry(String country){
        this.country = country;
    }

    public static Creator&lt;Objects&gt; CREATOR
            = new Creator&lt;Objects&gt;() {
        public Objects createFromParcel(Parcel parcel) {
            return new Objects(parcel);
        }

        public Objects[] newArray(int size) {
            return new Objects[size];
        }
    };
</code></pre>
