开发者

Accessing TourArray values in a different activity

开发者 https://www.devze.com 2023-03-21 23:56 出处:网络
I have a requirement that, I am having some description stored in an array list adapter which extends Base Adapter. I want to access these values in a different Activity say TourDescription and want t

I have a requirement that, I am having some description stored in an array list adapter which extends Base Adapter. I want to access these values in a different Activity say TourDescription and want to assign then to the editText in that.

Can any one tell me the solution?

Thanks in advance,

开发者_开发问答Tejaswi


I assume you are having ArrayList and you are passing it to your custom adapter, now you want to get the particular Object and pass it to the TourDescription activity.

So for that you need to write the below code inside the getItem() method in your adapter.

 @Override
 public Object getItem(int position) {
        // TODO Auto-generated method stub
        return itemList.get(position);
    }
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号