You can't implement an inner-interface or extend an inner-class. Simply move ConnectionFragment
to its own file.
This is because at compile time, these inner classes are dependent on the parent class - and NEVER the other way around. As proof, if you look at the compiled .class files, these inner-Objects are compiled as MainActivity$ConnectionFragment.class
or something there-abouts. If, however, ConnectionFragment
is compiled into its own file (ConnectionFragment.cass
), then MainActivity.class
can depend on it, and Eclipse will automatically handle the build-order.