title: Change variable inside listener
body: <p>I am attempting to set a variable x, which is contained by my class fragment. The class fragment contains a seekArc, and that seekArc's onSeekArcChangeListener. I am attempting to change variable x, which cannot be final, from inside the onProgressChanged method within the onSeekArcChangeListener. When I attempt to x.setVar() I get an error that x == null. Does anyone have any advice on how to do this?</p>
  
  <pre><code>private Y y = new Y();
  
  ...    
  
  public View onCreateView(LayoutInflater inflater,
                               ViewGroup container, Bundle savedInstanceState) {
  
          //Initializing Objects/Widgets
          View v = inflater.inflate(R.layout.fragment_display, container, false);
  
          seekArcOuter = (SeekArc) v.findViewById(R.id.seekArcOuter);
  
  
          //error is occuring online inside of the change listener method
          seekArcOuter.setOnSeekArcChangeListener(new SeekArc.OnSeekArcChangeListener() {
  
              @Override
              public void onStopTrackingTouch(SeekArc seekArc) {
                  //TODO
              }
  
              @Override
              public void onStartTrackingTouch(SeekArc seekArc) {
                  //TODO 
              }
  
              @Override
              public void onProgressChanged(SeekArc seekArc, int progress, boolean fromUser) {
  
                  if(y!=null)
                      y.setX(seekArc.getProgress());
                  else
                      Log.d(TAG, "onProgressChanged: y==null");
              }
          });
  
          return v;
      }
  </code></pre>
  
  <p>ERROR:</p>
  
  <pre><code>D////Display_Frag///: setY: onProgressChanged: y==null
  </code></pre>