SIMPLE Prompt input dialog + http

Quickly share your Android Code Snippets here...

SIMPLE Prompt input dialog + http

Postby ahbhill » Fri Apr 15, 2011 5:14 am

Hey guys,

I'm using Android 1.5 (Motorola i1 ptt dosent support over 1.5 so cant upgrade). I'm also new to java(VB, PHP for years). I'm having some trouble trying to grasp a simple input dialog box that would save the input as a variable.

for instence... in vbscript i would type

bob=inputbox("title", random question")

when ran, a messgae box would pop up and whatever the user typed in would be stored in the variable bob.

I would then run a random function using that variable
ex: GotoAddy "http://www.ebay.com/lookup.asp?item=" + bob

what would be the simplest way to do this in eclipse/java?

Thanks in advance,

Adam
ahbhill
Once Poster
Once Poster
 
Posts: 1
Joined: Fri Apr 15, 2011 5:01 am

Top

Re: SIMPLE Prompt input dialog + http

Postby kuler51 » Tue May 17, 2011 4:52 pm

I'm not the best android programmer considering I'm very new but if you don't want to have it pop up then all you need to do is make an EditText view. And then add a button on the screen and when you press then button say myVariable = editTextId.getText(); Of course you need to set the editText id up and stuff. Tutorials on that are easy to come by.
kuler51
Once Poster
Once Poster
 
Posts: 1
Joined: Tue May 17, 2011 2:55 am

Top

Return to Code Snippets for Android

Who is online

Users browsing this forum: No registered users and 7 guests