@Override public void viewEvent(TitleBar titleBar, View v) { if (TitleBar.RIGHT == titleBar) { if (!isMatcher()) { showToast("非法字符"); return; } dialog.show(); JSONObject jsonObject = new JSONObject(); try { jsonObject.put("pwd2", c_name); jsonObject.put("pwd3", a_name); jsonObject.put("user2", c_psw); jsonObject.put("user3", a_name); String param = jsonObject.toString(); int temp = DeviceSDK.setDeviceParam(device.getUserid(), 0x2002, param); if (temp > 0) { finish(); } } catch (JSONException e) { // TODO Auto-generated catch block e.printStackTrace(); } } else { finish(); } }
@Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.settinguser); setNaView(R.drawable.left_back_selector, "", 0, "", 0, "", R.drawable.right_finsh_selector, ""); setTitle("名称修改"); showProgressDialog("加载.."); BridgeService.setUserListener(this); initData(); initView(); DeviceSDK.getDeviceParam(device.getUserid(), Util.GET_USER); }