Link to home
Start Free TrialLog in
Avatar of lulubell-b
lulubell-b

asked on

OnClick Pop up new window to enter data

Hello,

I currently have a Edit Text on my Android app that I need to be able to click on and another pop up comes up so the user can enter data.

I have a toast box popup, but I would like a  popup so the user can enter the data and then the data gets sent back to the edit text.

The one I have below send the user to another activity. Please help

Thank you
myStockPrice.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				// Click Text Box to Move to Next Activity
                Intent myIntent = new Intent(getApplicationContext(), StockQuoteLkup.class);
                startActivity(myIntent);
			}
		});

Open in new window

Avatar of Gyufa
Gyufa

Hi!

I created a sample app for you, i hope it helps!
dialog-test.zip
Avatar of lulubell-b

ASKER

Thank you, Perfect functionality, now I just have to implement into my application :)

I see the openDialogButton.setOnClickListener(new View.OnClickListener() which opens the dialog activity when clicked.

How do I do this when I click the edit text box?

myStockPrice = (EditText)findViewById(R.id.txtStockPrice);

        myStockPrice.setOnClickListener(new OnClickListener() {
                  @Override
            public void onClick(View view) {
                showDialog(DIALOG);
            }
            });



ASKER CERTIFIED SOLUTION
Avatar of lulubell-b
lulubell-b

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This is more of what I was looking for.