Android ListView - Slide Subview in from Right?
Posted
by Chris
on Stack Overflow
See other posts from Stack Overflow
or by Chris
Published on 2010-06-11T16:14:48Z
Indexed on
2010/06/14
15:12 UTC
Read the original article
Hit count: 1021
I have a ListView. When I select an item in the ListView, I would like to have a Subview slide in from the right, the way that it does in many Apps.
I have been searching for tutorials on this topic but am spinning my wheels. Maybe Android uses a term different than "Subview" ?
Here's what I ended up doing:
Create a New Class for the SubView
Add the Subview class to the Manifest with
<activity android:name=".SubViewClassName" />
inside the<application>
tagAdd this to the main Class ("lv" is the ListView)
lv.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView parent, View view,int position, long id) {Intent myIntent = new Intent(view.getContext(),SubView.class);
}startActivityForResult(myIntent, 0);
});
© Stack Overflow or respective owner