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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T05:33:40+00:00 2026-06-04T05:33:40+00:00

Am using customDialog which i was customized to show list.my Requirement is Where ever

  • 0

Am using customDialog which i was customized to show list.my Requirement is Where ever having Edittext in my application.i need to show this dialog.am using Textwatcher in editext while user enter a number like if user enter 1 am passing it to that dialog class and done some functions to made a list like 10,100,1000,10000.

now once the user select any numbers from this list i want to set it into Editext.How can i do this? am trying this for a whole day?

public static void amount_dialog(final Activity activity,String str)
{
     amount=str;

     sequence_number();//from this method am generating list and setting it into my Arraylist

     dialog=new  Dialog(activity,R.style.CustomDialogTheme);    

     dialog.setContentView(R.layout.customdialog);

     ListView listView=(ListView) dialog.findViewById(R.id.listView12);              
     adapter=new ArrayAdapter<String>(activity,R.layout.list2,R.id.list_text1, strings);
     listView.setAdapter(adapter);  
     listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {

        @Override
        public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
                long arg3) {
            selected_amount=adapter.getItem(arg2);

            dialog.dismiss();


        }
    });


     dialog.getWindow().getAttributes().windowAnimations = R.style.DialogAnimation;

     dialog.show();
     dialog.setCanceledOnTouchOutside(true);


}
  • 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-04T05:33:42+00:00Added an answer on June 4, 2026 at 5:33 am

    Simply you can pass your EditText object to this method and inside the OnitemClickListener you can set text to the EditText using the values from your Arraylist.

    public static void amount_dialog(final Activity activity,String str,EditText edittextObject)
    {
         amount=str;
    
         sequence_number();//from this method am generating list and setting it into my Arraylist
    
         dialog=new  Dialog(activity,R.style.CustomDialogTheme);    
    
         dialog.setContentView(R.layout.customdialog);
    
         ListView listView=(ListView) dialog.findViewById(R.id.listView12);              
         adapter=new ArrayAdapter<String>(activity,R.layout.list2,R.id.list_text1, strings);
         listView.setAdapter(adapter);  
         listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
    
            @Override
            public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
                    long arg3) {
                selected_amount=adapter.getItem(arg2);
                 edittextObject.setText("get the value from arraylist here");
                dialog.dismiss();
    
    
            }
        });
    
    
         dialog.getWindow().getAttributes().windowAnimations = R.style.DialogAnimation;
    
         dialog.show();
         dialog.setCanceledOnTouchOutside(true);
    
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to send a request to a user using my custom dialog (which
When using custom dialog windows in a MVVM application, do you think it´s Ok
I stack with this, I'm trying to create application using TabLayout. I have 3
I'm using a class called customDialog, based on Based on http://effbot.org/tkinterbook/tkinter-dialog-windows.htm The standard code
After creating a custom Dialog using a ListView and my own implementation of ListAdapter
I believe this mostly applies to custom dialog boxes being put into DLLs, but
When calling progressDialog = ProgressDialog.show(this, null, null, true); usually the developers wants to only
I'm using AsyncTask in my custom Dialog. AsyncTask works fine in activity, but inside
I have created a custom dialog for Visual Studio Setup Project using the steps
I'm creating a custom dialog with a background image which has rounded corners. I

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.