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
Post a Comment