Silicon Valley Social 4--settings page

Source: Internet
Author: User

private void InitData () {//Displays the current user name on the button Bt_setting_out.settext ("Exit login (" + emclient.getinstance (). Getcurrentuser () + ")");//Log out of the logical processing Bt_setting_out.setonclicklistener (new View.onclicklistener () {@Overridepublic void OnClick (View v) {model.getinstance (). Getglobalthreadpool (). Execute (new Runnable () {@Overridepublic void Run () {// Log on to the Ring mail server to exit login emclient.getinstance (). Logout (False, new Emcallback () {@Overridepublic void onsuccess () {// Close Dbhelpermodel.getinstance (). Getdbmanager (). Close (); Getactivity (). Runonuithread (New Runnable () {@Overridepublic void Run () {//Update UI Display Toast.maketext (Getactivity (), "Exit succeeded", Toast.length_short). Show ();//Return to login page Intent intent = new Intent (Getactivity (), loginacitivity.class); startactivity (Intent); Getactivity (). Finish ();}}); @Overridepublic void OnError (int i, final String s) {getactivity (). Runonuithread (New Runnable () {@Overridepublic void run () {Toast.maketext (getactivity (), "Exit failed" + S, Toast.length_short). Show ();});} @Overridepublic void onprogress (int i, string s) {}});});} 

  

User name becomes uppercase workaround (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 "/>

  

Silicon Valley Social 4--settings page

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.