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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T02:24:22+00:00 2026-06-13T02:24:22+00:00

I am developing a Jade Multiagent System that sends messages between devices through a

  • 0

I am developing a Jade Multiagent System that sends messages between devices through a jade server, everything worked fine until I needed to add some Spinners, im also getting an ArrayList object from another class through an interface. Any thoughts on what Im doing wrong? Heres some of the code:

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.ventana_enviar_mensaje);

    Intent intent = getIntent();
    usuario = intent.getStringExtra("usuario");

    Button bt = (Button) findViewById(R.id.bt_enviar);
    bt.setOnClickListener(bt_enviar_pregunta_OnClick);

    bt = (Button) findViewById(R.id.bt_agregar);
    bt.setOnClickListener(bt_agregar_OnClick);

    //Register to interface class
    try{
        interfaz = MicroRuntime.getAgent(usuario).getO2AInterface(Interfaz.class);}
    catch (StaleProxyException e) {
        e.printStackTrace();
    } catch (ControllerException e) {
        e.printStackTrace();
    }

            //Put some values into spinners
    Spinner sp = (Spinner) findViewById(R.id.sp_categoria);

    adaptador = new ArrayAdapter<String>(this,0);
    adaptador.add("Cat1");
    adaptador.add("Cat2");
    adaptador.add("Cat3");
    adaptador.add("Cat4");
    sp.setAdapter(adaptador);
    adaptador.clear();

    sp = (Spinner) findViewById(R.id.sp_tipo);
    adaptador.add("Tipo1");
    adaptador.add("Tipo2");
    adaptador.add("Tipo3");
    adaptador.add("Tipo4");
    sp.setAdapter(adaptador);
    adaptador.clear();
    //Retrieve the list from another class
    ArrayList activos = new ArrayList();
    try {
        activos = interfaz.ObtenerActivos();
        sp = (Spinner) findViewById(R.id.sp_destinatarios);
        Iterator it = activos.iterator();
        while(it.hasNext())
        {
            adaptador.add(it.next().toString());
        }           
        sp.setAdapter(adaptador);
    } catch (FIPAException e) {
        e.printStackTrace();
    }
}
  • 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-13T02:24:25+00:00Added an answer on June 13, 2026 at 2:24 am

    Just replaced:

    adaptador = new ArrayAdapter<String>(this,0);
    

    with:

    adaptador = new ArrayAdapter<String>(this,android.R.layout.simple_spinner_dropdown_item);
    

    My bad

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

Sidebar

Related Questions

For developing an devices monitor system, I am using a InetAdress isReachable method to
Developing search utility to search a file entire computer system, works fine on windows
Iam developing one application.In that iam placing the radio buttons(uiimageview) on table view and
While developing an application using gwt in ecliplse crashed. Now the server is running
iam developing one application.In that i need to get the music files from the
Developing a site that requires monthly subscriptions via PayPal. If a buyer has an
Developing a series of POCOs on my project, and just realized that some of
Developing for iPhone, I have a collection of points that I need to make
Developing with my first Mac and I noticed that my Rspec output isn't colorized
Developing a network application, I have a Connection class that manages sending and receiving

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.