Click here to Skip to main content
16,017,351 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi I am making an application where i have three tab.In first tab i have list of some items and one button.my problem is i want to transfer checked item from listview of first tab to second tab on button click.All tabs are activities when i click button so second activity open as activity not as tab.
Posted

1 solution

String[] items={"a","b"}
List< String> list1;

in oncreate
list1=Arrays.asList(items);


public void onItemClick(AdapterView<?> arg0, View arg1,
int arg2, long arg3) {
// TODO Auto-generated method stub
Toast.makeText(getApplicationContext(),items[arg2](item is ur string),Toast.LENGTH_SHORT).show();

System.out.println("Item Clicked");

String printme;
printme=items[arg2];(item is your are stringarry)
}


in button click
call second class static sting and assign that string=printme.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900