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

Apps Help going from list view, to relevant text view.

Discussion in 'Android Development' started by deenybird, Feb 4, 2009.

  1. deenybird

    deenybird Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    3
    Joined:
    Feb 4, 2009

    Feb 4, 2009
    3
    0
    5
    I'm trying to figure out how to have the user presented with a 'list view' of several options, than by clicking on one of the items have it open up a text view on a new screen with the relevant text. The problem I'm having is passing the variable to another class.

    It's my understanding that I need to use an intent to pass the variable but if thats the case, what is the point of making a public integer? I was under the impression "public" means any class can use that variable.

    Here is the code I have so far

    listview1.setOnItemSelectedListener(new OnItemSelectedListener() {

    @Override
    public void onItemSelected(AdapterView<?> arg0, View arg1, int arg2, long arg3) {

    Intent.putExtra(someKey, ID)

    }
    }

    I really appreciate any feedback provided.
     

    Advertisement

Share This Page

Loading...