Silicon Valley social 4 -- setting pages, Silicon Valley social 4 --
Private void initData () {// The current user name bt_setting_out.setText ("log out (" + EMClient. getInstance (). getCurrentUser () + ")"); // logic for logging out. bt_setting_out.setOnClickListener (new View. onClickListener () {@ Overridepublic void onClick (View v) Rule model.getinstance().getglobalthreadpool(cmd.exe cute (new Runnable () {@ Overridepublic void run () {// log on to the email Center Server and exit em. getInstance (). logout (false, new EMCallBack () {@ Overridepublic void onSuccess () {// disable DBHelperModel. getInstance (). getDbManager (). close (); getActivity (). runOnUiThread (new Runnable () {@ Overridepublic void run () {// update the ui display Toast. makeText (getActivity (), "logout successful", Toast. LENGTH_SHORT ). show (); // return to the logon page. Intent intent = new Intent (getActivity (), loginaciti.pdf. class); startActivity (intent); getActivity (). finish () ;}) ;}@ Overridepublic void onError (int I, final String s) {getActivity (). runOnUiThread (new Runnable () {@ Overridepublic void run () {Toast. makeText (getActivity (), "logout failed" + s, Toast. LENGTH_SHORT ). show () ;}}) ;}@ Overridepublic void onProgress (int I, String s ){}});}});}});}
Solution to changing the user name to uppercase (android: textAllCaps = "false ")
<Button android: id = "@ + id/bt_setting_out" android: text = "exit" android: textSize = "20sp" android: textAllCaps = "false" android: textColor = "@ android: color/white" android: background = "@ android: color/holo_red_light" android: layout_width = "match_parent" android: layout_height = "60dp"/>