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

  • Home
  • SEARCH
  • 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 8619463
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T06:20:46+00:00 2026-06-12T06:20:46+00:00

I want to open a Custom Dialog() when my Custom list view item is

  • 0

I want to open a Custom Dialog() when my Custom list view item is clicked.

I tried so far but can’t open the dialog. Here is code details:

@Override
protected void onListItemClick(ListView l, View v, int position, long id) {
    // TODO Auto-generated method stub
    super.onListItemClick(l, v, position, id);

    Dialog dialog = new Dialog(this);
    dialog.setContentView(R.layout.input_dialog);
    dialog.setTitle("What about Today!");

           **//initialize custom dialog items.**
    EditText mood = (EditText) dialog.findViewById(R.id.editTextyourMode);
    Button btnSaveButton = (Button) dialog
            .findViewById(R.id.btnSaveMyMoods);
    Button btnClear = (Button) dialog
            .findViewById(R.id.btnClear);
    dialog.show();

}

here is custom Array adapter getView(…) method.

@Override
public View getView(int position, View convertView, ViewGroup parent) {

LayoutInflater inflater = (LayoutInflater) context
            .getSystemService(Context.LAYOUT_INFLATER_SERVICE);

View rowView = inflater.inflate(R.layout.sell_info_list, parent, false);


TextView product_id = (TextView) rowView.findViewById(R.id.product_id);//
product_id.setText(products.get(position).getProduct_id());

EditText product_quantity = (EditText) rowView
            .findViewById(R.id.editTextQuantity);

return rowView;
}

Finally,I want to open this dialog whenList view item edit text is clicked.
Anyone help me?

  • 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-06-12T06:20:47+00:00Added an answer on June 12, 2026 at 6:20 am

    i open the dialog typing from these inside getView(…) in Adapter and also can showing on the selected listview item EditText.

        rowView.setClickable(true);
        rowView.setOnClickListener(new OnClickListener() {
    
            @Override
            public void onClick(View v) {
    
                dialog = new Dialog(context);
                dialog.setContentView(R.layout.input_dialog);
                dialog.setTitle("What about Today!");
    
                final EditText txtMode = (EditText) dialog
                        .findViewById(R.id.editTextyourMode);
                Button btnSave = (Button) dialog
                        .findViewById(R.id.btnSaveMyMoods);
    
                btnSave.setOnClickListener(new OnClickListener() {
    
                    @Override
                    public void onClick(View v) {
    
                        String data = txtMode.getText().toString();
                        product_quantity.setText(data);
                        dialog.dismiss();
                        Log.d("data", data);
    
                    }
                });
                dialog.show();
            }
        });
    

    Then the Screen look like that.
    enter image description here

    Now facing a problem.My List View has just 10 items.When i scrolling the list view,the item text vanish which is unseen

    Thanks every one for sharing knowledge.**

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

Sidebar

Related Questions

I want to open a custom dialog in onHandleIntent() method of an IntentService class,
Hai all, In my iphone application i want to open a my custom application(available
I want to open a MFC modeless dialog from a MFC dll injected into
I have a custom class library that performs validation. I want to open up
I have a list view with custom adapter, with an Image Button and a
I want to use the following jQuery dialog box for to open different popup
I have the following code in the javscript to open a confirmation dialog with
i want to show custom dialog with given size and given postion. first time
I want to open a dialog in combination with touchOverflowEnabled: true. The problem is
Ive created a custom adpater for my list view aswell as having created my

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.