java - Is it (or not) encouraged to use inner class in Android development? -


I have read in a book that using an internal class will make the app bigger (many internal internal square per-kilometer), But is there any concern about the performance? I looked at internal classes used in Google's sample code, but in general, are or are encouraged to use internal organs in Android?

Thank you!

1 When you want to apply the interface method more than 1 time and more than 1 way in the same class.

2. Anonymous class is the best way to build reward handlers.

3. Using top level orbits (i.e. stable internal orbit) will be mild, because it is like an external class, which does not have any underlying reference to an external class.

The non-static inner square will be a bit overhead, because it holds the underlying context for the outer orbit. Example:

Example:

  Public Class Outside { Int x = 10; Class internal {int x = 5; Public Zero () {System.out.println ("Inner X:" + this.x); // Ink Class System.outprintln ("Inner X:" + External.x.x) Print in x; // x print in outer orbit}}}    

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -