Skip to content Skip to sidebar Skip to footer

Uploadingitemadapter Gives Logcat Null Value And Listitem's Text Views Are Also Remains Blank In Fragment Of Listview

I don't know in which part i made mistake. In UploadItemAdapter.class,uploadingDetails.getTitle() and uploadingDetails.getDiscription() both gives me null in my log cat. In android

Solution 1:

The name of the fields in your model class must much to the name of the data on witch your want retrieve in firebase data reference node

Solution 2:

I don't understand how it worked but when i changed following code problem was solved UploadindDetils.java

package com.example.shiva.gconnection;

publicclassUploadingDetails {
    privateString mTitle;
    privateString mDiscription;
    privateString mArrayUri;

    publicUploadingDetails() {
    }

    publicUploadingDetails(String title, String discription, String arrayUri) {
        this.mTitle = title;
        this.mDiscription = discription;
        this.mArrayUri = arrayUri;

    }

    publicStringgetTitle() {
        returnthis.mTitle;
    }

    publicvoidsetTitle(String title) {
        this. mTitle = title;
    }

    publicvoidsetDiscription(String discription) {
        this.mDiscription = discription;
    }

    publicvoidsetArrayUri(String arrayUri) {
        this.mArrayUri = arrayUri;
    }

    publicStringgetDiscription() {
        returnthis.mDiscription;
    }

    publicStringgetArrayUri() {
        returnthis.mArrayUri;
    }
}

Post a Comment for "Uploadingitemadapter Gives Logcat Null Value And Listitem's Text Views Are Also Remains Blank In Fragment Of Listview"