FunDapter icon indicating copy to clipboard operation
FunDapter copied to clipboard

How to get the value of Object

Open PraveenGaur1987 opened this issue 7 years ago • 0 comments

Hello Friend, i made this program to fetch data from Mysql database now i want to access the value of (**item.praveen)**object from which we fetch data from server. please tell me how to get the value of that object and use where i want.

public void getuserType(){ String URL3 = "http://xyz/xyz/xyzs.php?user_id="+userName; PostResponseAsyncTask readData3 = new PostResponseAsyncTask(this, new AsyncResponse() { @Override public void processFinish(String u) { if (u.contains("Fail")) { Toast.makeText(newAdd.this, "Something went wrong sorry", Toast.LENGTH_SHORT).show(); } else { task3(ctx,u); } } }); readData3.execute(URL3); }

public void task3(Context ctx,String u) {
    userd = new JsonConverter<userId>().toArrayList(u, userId.class);
    BindDictionary<userId> allReviews = new BindDictionary<userId>();

    allReviews.addStringField(R.id.tvUserId,
            new StringExtractor<userId>() {
                @Override
                public String getStringValue(userId item, int position) {

                    ///userValue.setText(item.praveen);
                    
                    **return item.praveen;**
                }
            });

    FunDapter<userId> detailsAdapter = new FunDapter<>(newAdd.this, userd, R.layout.userid_single, allReviews);
    grid.setAdapter(detailsAdapter);

}

PraveenGaur1987 avatar May 24 '17 12:05 PraveenGaur1987