10 Replies - 18561 Views - Last Post: 10 June 2012 - 07:16 AM

#1 run4life2live  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 14-March 12

How do you create drop drop down list in eclipse for an android applic

Posted 08 June 2012 - 12:45 PM

i am creating an app using eclipse. it is my first one. i want to put a drop down list. ya know, the things where you click the arrow, and a list falls down, and when you click the arrow again, they go back up? idk how to create that, place it on my app screen, and type in the options i want inside the list. please help!
Is This A Good Question/Topic? 0
  • +

Replies To: How do you create drop drop down list in eclipse for an android applic

#2 Sheph  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 432
  • View blog
  • Posts: 1,020
  • Joined: 12-October 11

Re: How do you create drop drop down list in eclipse for an android applic

Posted 08 June 2012 - 12:48 PM

Look into JComboBox.
Was This Post Helpful? 0
  • +
  • -

#3 Ryano121  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1362
  • View blog
  • Posts: 3,002
  • Joined: 30-January 11

Re: How do you create drop drop down list in eclipse for an android applic

Posted 08 June 2012 - 12:49 PM

I think you're thinking about Spinners.

Some reading.

Some more reading.
Was This Post Helpful? 1
  • +
  • -

#4 run4life2live  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 14-March 12

Re: How do you create drop drop down list in eclipse for an android applic

Posted 08 June 2012 - 12:52 PM

i tried spinners...idk how to place text in them though. help?

and i dont think you can put jcombo boxes in eclipse, can you?
Was This Post Helpful? 0
  • +
  • -

#5 Ryano121  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1362
  • View blog
  • Posts: 3,002
  • Joined: 30-January 11

Re: How do you create drop drop down list in eclipse for an android applic

Posted 08 June 2012 - 12:54 PM

Read the links. They both give you full examples of how to put your options into an XML file and make a Spinner with them.
Was This Post Helpful? 0
  • +
  • -

#6 run4life2live  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 14-March 12

Re: How do you create drop drop down list in eclipse for an android applic

Posted 08 June 2012 - 01:49 PM

@Ryano121 i looked at the first link and i did what it said, i do have one error though. for number four, on the line that starts
this, R.array.planet_array 
etc, i made array a field in R, but there is now an error with planet_array. if i take away that field, array has an error. both errors say it is not a field.
Was This Post Helpful? 0
  • +
  • -

#7 Ryano121  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1362
  • View blog
  • Posts: 3,002
  • Joined: 30-January 11

Re: How do you create drop drop down list in eclipse for an android applic

Posted 08 June 2012 - 01:59 PM

Just copy and paste the code there for now to get it working, following the instructions with the exact namings.
Was This Post Helpful? 0
  • +
  • -

#8 run4life2live  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 14-March 12

Re: How do you create drop drop down list in eclipse for an android applic

Posted 08 June 2012 - 02:00 PM

i did, and it isnt working with that one line of code. idk why
Was This Post Helpful? 0
  • +
  • -

#9 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8332
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: How do you create drop drop down list in eclipse for an android applic

Posted 08 June 2012 - 07:06 PM

View Postrun4life2live, on 08 June 2012 - 03:52 PM, said:

and i dont think you can put jcombo boxes in eclipse, can you?

You completly miss the concepts here

Java is Java and JComboBox are part of the standard Java API

Eclipse is just a fancy editor to write Java code

This post has been edited by pbl: 08 June 2012 - 07:06 PM

Was This Post Helpful? 0
  • +
  • -

#10 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10561
  • View blog
  • Posts: 39,072
  • Joined: 27-December 08

Re: How do you create drop drop down list in eclipse for an android applic

Posted 08 June 2012 - 07:12 PM

View Postrun4life2live, on 08 June 2012 - 03:52 PM, said:

i tried spinners...idk how to place text in them though. help?

and i dont think you can put jcombo boxes in eclipse, can you?

*Moved to Android*

It's not about the IDE, Eclipse, as pbl said. A JComboBox is a Swing Component- the standard Java GUI library. Android uses its own GUI library, so you will have to use Spinners as Ryano121 suggested.
Was This Post Helpful? 0
  • +
  • -

#11 slehmann101  Icon User is offline

  • D.I.C Head

Reputation: 21
  • View blog
  • Posts: 146
  • Joined: 30-November 11

Re: How do you create drop drop down list in eclipse for an android applic

Posted 10 June 2012 - 07:16 AM

Spinner tutorial
This is a youtube tutorial regarding spinners which you should find helpful
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1