0

i am Getting error in android app The constructor ArrayAdapter(Menu, int, String[]) is undefined this is my code:

package com.example.may_sec;

import android.R.string;
import android.app.ListActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListView;

public class Menu extends ListActivity

{
//the menu options:
String activitys1[] = {"MainActivity", "Splash"};



@Override
protected void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);

    setListAdapter(new ArrayAdapter<string>(Menu.this, 0, activitys1) );

}

@Override
protected void onListItemClick(ListView l, View v, int position, long id) {
    // TODO Auto-generated method stub
    super.onListItemClick(l, v, position, id);


}

i did some search hear but can find an answer..

1
  • Did my answer make sense? Commented May 24, 2013 at 0:30

1 Answer 1

1

Change this

setListAdapter(new ArrayAdapter<string>(Menu.this, 0, activitys1) );

to

setListAdapter(new ArrayAdapter<String>(Menu.this, 0, activitys1) );

capital "S" on "string"

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.