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 7439283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:41:02+00:00 2026-05-29T10:41:02+00:00

I am making an android application that needs to use a ListView . I

  • 0

I am making an android application that needs to use a ListView. I want to add a menubutton that says “Add to list” and once the user presses that menubutton, it pops up a popupwindow containing a TextView, EditText and two Buttons, “Ok” and “Cancel”. Once the user presses “Ok”, the text inside the EditText should be added to the ListView. And the cancel Button is obvious. I also want to be able to long press on a ListView item to open a popupwindow containing a delete Button. I want to design the ListView screen using XML. How can i make this possible??? Please help me and thanks SO much in advance! I am using this code so far:

ListView activity:

public class NotesActivity extends ListActivity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
}

Main screen XML:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/background"
android:orientation="vertical" >








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

</ListView>

</LinearLayout>
  • 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-29T10:41:03+00:00Added an answer on May 29, 2026 at 10:41 am
    1. You have to create a layout containing a listView.

    2. You have to create an xml lyout corresponding to one row of your list view.

    3. You have to create an adapter which will populate data to insert in your listView

    4. You have to create an onClickListener on your button to add data in your list

    5. If you are using an ArrayAdapter or a CursorAdapter, add the new
      item you created to the list or the cursor used by your adapter and
      (notifyDataSetChanged() is automatically called), so your adapter will update the
      listview

    Source :
    http://developer.android.com/resources/tutorials/views/hello-listview.html

    Previous topic on it : Dynamic ListView in Android app

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

Sidebar

Related Questions

So I'm making this android application, that needs to read data from user-provided CSV
I am making an android application that needs to add items to a dynamic
I am making an android application that uses a listview. I want to get
I am making an android application that will play an mp3 file once a
I'm making an application for Android that needs to react to when the device
i am making one application in Android 2.2 in that application i want to
I am making an android application that shows a list with users, I would
I am making an android application that needs to display all of the items
I'm trying to create an application that can use the android as a fax
I'm making an application that updates a user's location and path in real time

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.