Silicon Valley social 4 -- setting pages, Silicon Valley social 4 --

Source: Internet
Author: User

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"/>

  

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.