title: Splitting big classes with Inner classes in Java
body: <p>I am working on an Android project. I have searched high and low but I can't figure out a good strategy to split and package my code. </p>
  
  <p><strong>My problem is that I have Inner Classes that use the main class variables</strong>, and I can't figure out <strong>how to decouple them</strong>.</p>
  
  <p><strong>I have tried to create helper classes, but then either I pass a lot of variables through constructors, or I expose my main class, and I don't want to do either</strong>.</p>
  
  <p>I want to keep max lines of code per class to 150. Currently, it's 278. I am looking for <strong>ideas to decouple these</strong>, specifically, how to restructure classes to preserve abstraction (<code>private</code> variables). What are the <code>Java</code> best practices for this?</p>
  
  <p>As an example, <a href="https://www.dropbox.com/s/r2mf80d47b6ncp1/MainActivity.java?dl=0" rel="nofollow">here</a>'s one of my main classes, <code>MainActivity</code>, ~300 lines.</p>