1. Download our Official Android App: Forums for Android!

error message while clicking on checkdata on android emulator

Discussion in 'Introductions' started by abhinaibondada, May 10, 2012.

  1. abhinaibondada

    Thread Starter
    Rank:
    None
    Points:
    25
    Posts:
    5
    Joined:
    May 10, 2012

    May 10, 2012
    5
    0
    25
    public class CheckData extends ListActivity {
    TextView selection;
    public int idToModify;
    DataManipulator dm;

    List<String[]> names1 =null ;
    String[] stg1;
    protected void onCreate(Bundle savedInstanceState){
    super.onCreate(savedInstanceState);
    setContentView(R.layout.check);
    dm = new DataManipulator(this);
    names1 = dm.selectAll();

    stg1=new String[names1.size()];

    String stg;

    for (String[] name : names1) {stg = name[1];
    }

    ArrayAdapter<String> adapter = new ArrayAdapter<String>(
    this,android.R.layout.simple_list_item_1,stg1);
    this.setListAdapter(adapter);
    selection=(TextView)findViewById(R.id.selection);

    }

    public void onListItemClick(ListView parent, View v, int position, long id) {
    selection.setText(stg1[position]);
    }
    }
    i added an activity in androidmanifest.xml as
    <activity android:name=".CheckData"></activity>

    when i was clicking checkdata on android emulator it should show the stored data which i stored but i cannot acces data by this button...
    any one help me
     

    Advertisement

  2. D-U-R-X

    D-U-R-X turbo drinker
    Rank:
    None
    Points:
    1,343
    Posts:
    16,880
    Joined:
    Apr 20, 2011

    Apr 20, 2011
    16,880
    7,194
    1,343
    Work to live, not the other way round!!
    Sheffield, South Yorkshire
    Hello and welcome to the forums... thanks for joining! :)

    I do not know what it is you are trying to do... it looks liek a development type of question and, as such, I am unable to help.

    If it is development related, you would get a better answer by posting in Android Development - Android Forums (as other devs hang out in there).

    Hope you find this place useful... shout out to one of us guides if you need any help navigating the forums :D
     
    abhinaibondada likes this.

Share This Page

Loading...