예제 #1
0
 /** 操作view更新UI */
 public void loadUser(int id) {
   UserBean user = mUserModel.load(id);
   // 通过调用IUserView的方法来更新显示
   mUserView.setFirstName(user.getmFirstName());
   mUserView.setLastName(user.getmLastName());
 }
예제 #2
0
 /** 操作model处理数据 */
 public void saveData(int id, String firstName, String lastName) {
   mUserModel.setID(id);
   mUserModel.setFirstName(firstName);
   mUserModel.setLastName(lastName);
   mUserView.cleanAll();
 }