java - What is the better way, keeping adapter as an inner class of activity or outside? -



java - What is the better way, keeping adapter as an inner class of activity or outside? -

i want check improve , faster way programme of using adapter listview. out or in activity class?

this more of java question android.

inner classes more making code readable , not impact performance as long utilize static inner classes. static inner classes pulled out compiler , compiled separate classes (class$innerclass).

so if using inner classes helpful in terms of code organization, can safely go ahead , utilize them. though i'd recommend using static inner classes.

edit

static inner classes suffice in context, of adapter wouldn't need access of variables of activity.

java android android-activity adapter listactivity

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -