Advertisement
Guest User

Untitled

a guest
Oct 1st, 2014
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. public Bundle setActivityState(Bundle bundle){
  2. startBtn = (Button) findViewById(R.id.startSensorsBtn);
  3.  
  4. startBtn.setVisibility(
  5. getVisibilityState(bundle, PersistanceConstants.START_BTN_STATE)
  6. );
  7.  
  8. return bundle;
  9. }
  10.  
  11. public int getVisibilityState(Bundle bundle, String keyName){
  12. if (bundle.getInt(keyName) == View.VISIBLE){
  13. return View.VISIBLE;
  14. } else if (bundle.getInt(keyName) == View.INVISIBLE){
  15. return View.INVISIBLE;
  16. } else if (bundle.getInt(keyName) == View.GONE){
  17. return View.GONE;
  18. }
  19.  
  20. return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement