Design and implementation of registration Interface (ii) Realization of registered business logic

Source: Internet
Author: User

Business Flowchart:

Development steps:?

    • Get user-entered account number and password?
    • Use if logical statements for business logic judgments?
    • Give the user the appropriate hints based on the results of the judgment
1 //Register_activity.java2 3    Private BooleanCheckform () {4         if( This. Txtregaccount.gettext (). toString () = =NULL|| This. Txtregaccount.gettext (). toString (). Length () = = 0) {5Toast.maketext (Getapplicationcontext (), "Warning: Registered account cannot be empty", Toast.length_long). Show ();6             return false;7         }8         if( This. Txtregpassword.gettext (). toString () = =NULL|| This. Txtregpassword.gettext (). toString (). Length () = = 0) {9Toast.maketext (Getapplicationcontext (), "Warning: registration password cannot be empty", Toast.length_long). Show ();Ten             return false; One         } A         if(! ( This. Txtregpassword.gettext (). toString ()). Equals (( This. Txtreregpassword.gettext (). toString ()))) { -Toast.maketext (Getapplicationcontext (), "Warning: two times password Inconsistent", Toast.length_long). Show (); -             return false; the         } -         return true; -}

Run:

Design and implementation of registration Interface (ii) Realization of registered business logic

Related Article

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.