예제 #1
1
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    Bundle parms = getIntent().getExtras();
    int sessionId = parms.getInt("sess_id");
    profileId = parms.getInt("prof_id");

    if (savedInstanceState != null) {
      sessionId = savedInstanceState.getInt("sess_id");
    }

    if (sessionId == 0) {
      loginFailure();
    } else {
      loadContext(sessionId);
    }
  }
예제 #2
0
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    if (savedInstanceState == null) {
      x = 50;
    } else {
      x = savedInstanceState.getInt("x");
    }
    y = 50;
    vw = new MyView(this);
    vw.setFocusable(true);
    vw.setFocusableInTouchMode(true);
    setContentView(vw);
  }