i have done with listactvity in my application ,now i need expand
when clicks and for each item
and again click on expandble list items should be back in same screen.
can you please guide me any one about this
///////////////////
package com.android.samplelisy;
import android.app.ListActivity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.ListView;
public class samplelist extends ListActivity {
String[] values = new String[] { "Application", "product",
"Sabicproduct" };
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
// Use your own layout
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
R.layout.main, R.id.label, values);
setListAdapter(adapter);
}
@Override
protected void onListItemClick(ListView l, View v, int position, long id)
{
String item = (String)
getListAdapter().getItem(position);
switch (position) {
case 0:
l.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> av, View v, int pos, long id) {
// onListItemClick(v,pos,id);
}
private void onListItemClick(View v, int pos, long id) {
// TODO Auto-generated method stub
}
});
break; case 1:
break;
}
}
}
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
No comments:
Post a Comment