Hi everyone. I'm not sure if this question belongs here but here
goes..

I am a professional asp.net developer looking to get into android dev.

I have been going through tutorials and having fun so far!

I have a question related to how the tutorial is asking me to
structure my code.
The code is from a tutorial where I create a gridview and set up a
click listener event:
gridview.setOnItemClickListener(new OnItemClickListener() {
                public void onItemClick(AdapterView<?> parent, View v,
                                                 int position, long id) {
                        Toast.makeText(HelloGridViewActivity.this, "Position: " 
+
position, Toast.LENGTH_SHORT).show();
                        }
        });

To me this structure is kind of messy, what I would like to do is have
the function, public void onItemClick be by itself, so that I can do
something more along the lines of: (psudo code)
gridview.setOnItemClickListener([somehow reference the function
here]);

Is what I'm asking possible?
Does my question make sense?
Is there a more appropriate group to ask this kind of question?

Thanks very much for your time.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to