I have implemented a custom list view which looks like the twitter
timeline.



    adapter = new MyClickableListAdapter(this, R.layout.timeline,
mObjectList);
           setListAdapter(adapter);


The constructor for MyClickableListAdapter is as follows

    private class MyClickableListAdapter extends ClickableListAdapter{

      public MyClickableListAdapter(Context context, int viewId, List
objects) {
       super(context, viewId, objects);
      }



ClickableListAdapter extends BaseAdapter and implements the necessary
methods.

The xml code for the list view is as follows

    <ListView
        android:id="@+id/android:list"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        />


This is what it  looks like. 
http://www.freeimagehosting.net/image.php?66c4ed3ea6.png

I have 3 questions

<b>1)</b> I tried registering a context menu for the list view by
adding the line after setting the list adapter

`registerforContextMenu(getListView())`;

But on long-click the menu doesnt get displayed. I cannot understand
what I am doing wrong!

<b>2)</b> Is it possible to display a textview above the listview? I
tried it by adding the code for textview above the listview. But then,
only the textview gets displayed.

<b>3)</b> I have seen in many twitter clients that on clicking post a
window pops up from the top covering only some portion of the screen
and rest of the timeline is visible. How can this be done possibly
without starting a new activity?

Any help would be much appreciated..


-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to