Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 814495
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T01:31:53+00:00 2026-05-15T01:31:53+00:00

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

  • 0

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.

I have 3 questions

1) 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!

2) 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.

3) I have seen in many twitter clients that on clicking post in the options menu a window pops up from the top of the screen covering only as much its required and rest of the timeline is visible. How can this be done in Android? A window to enter the message and on pressing post the message is passed to the Activity that started it. The Window pops up from the top and takes only a quarter of the screen, rest of the screen displays the contents of the earlier activity.

Any help would be much appreciated..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T01:31:54+00:00Added an answer on May 15, 2026 at 1:31 am

    I cannot understand what I am doing
    wrong!

    Did you implement onCreateContextMenu()?

    Is it possible to display a textview
    above the listview?

    Yes.

    I tried it by adding the code for
    textview above the listview. But then,
    only the textview gets displayed.

    See this sample project from one of my books for a TextView above a ListView.

    How can this be done possibly without starting a new activity?

    It is a little difficult to answer that given your description. My guess is that it is via an animation. See this sample project from another one of my books for a Twitter client where the field and button for a status update can be hidden and shown via an option menu choice and an animation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a custom list view implemented with Baseadapter. My dataset includes a string
I have a custom control that is derived from ListView . This list view
In my application i have used list view and custom cell which contain product
I have implemented a custom ActionMapper which obtains the locale from the URI (the
I have implemented a list of users in my Qt program, using the model/view
I have a listview with custom array adapter, the view allows the user to
I have a AutoCompleteTextView and a custom AutoCompleteTextView adapter. my list has 20 items
I have List of items. I'm using custom adapter (Android 1.5). Everything works perfectly,
I have a custom ListView adapter which implements an ImageThreadLoader class. Unfortunately, the class
I have a custom ListView adapter which implements an ImageThreadLoader class. Unfortunately the class

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.