public Ticket createTicket() {
    Ticket mTicket = new Ticket();

    mTicket.setTitle((mTitle.getText()).toString().trim());
    mTicket.setLogin((mLogin.getText()).toString().trim());
    mTicket.setPassword((mPassword.getText()).toString().trim());
    mTicket.setNotes((mNotes.getText()).toString().trim());
    mTicket.setId(id);

    return mTicket;
  }
 @Override
 public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   Log.i(TAG, "onCreate()");
   mDbHelper = new DBHelper(getActivity());
   if (savedInstanceState != null) {
     mTicket = new Ticket();
     mTicket.setTitle(savedInstanceState.getString("mTitle"));
     mTicket.setLogin(savedInstanceState.getString("mLogin"));
     mTicket.setPassword(savedInstanceState.getString("mPassword"));
     mTicket.setNotes(savedInstanceState.getString("mNotes"));
     id = savedInstanceState.getInt("mId");
   }
 }