Advertisement
Guest User

Untitled

a guest
Apr 1st, 2015
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. @Override
  2. public void onClick(View view) {
  3. if (_oaLeft.isRunning() || _oaRight.isRunning() || _crossfadeRunning) return;
  4.  
  5. SharedPreferences.Editor editor = _sp.edit();
  6. boolean pref = _sp.getBoolean(_prefName, false);
  7. if (pref) {
  8. _oaLeft.start();
  9. _crossfadeViews(background_oval_on, background_oval_off, 110);
  10. }
  11. else {
  12. _oaRight.start();
  13. _crossfadeViews(background_oval_off, background_oval_on, 400);
  14. }
  15.  
  16. editor.putBoolean(_prefName, !pref);
  17. editor.apply();
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement