AFormChange v1.0, Android form value Modification framework

Source: Internet
Author: User

AFormChange v1.0, Android form value Modification framework

AFormChange is a free, open-source, simple, and small framework that complies with the Apache Licence 2.0 open-source Protocol and is easily scalable when android form data is changed.
AFormChange android form value Modification framework

AFormChange is the library and jar packages can be exported directly.

AFormChangeDemo for demonstration, quick learning to use AFormChange as the Library

AValidations usage

1. Download the zip file or clone the AFormChange project.

2. Import Eclipse, right-click Project-> preference-> Android-> library-> Add, select AFormChange project, and then apply

3. demo

 
 
  1. Private TextView tvChange;
  2. Private EditText editText1;
  3. Private EditText editText2;
  4.  
  5. Private Button button1;
  6.  
  7. Private FormHandler formHandler;
  8.  
  9. @ Override
  10. Protected void onCreate (Bundle savedInstanceState ){
  11. Super. onCreate (savedInstanceState );
  12. SetContentView (R. layout. activity_main );
  13.  
  14. TvChange = (TextView) findViewById (R. id. TV _change );
  15. EditText1 = (EditText) findViewById (R. id. editText1 );
  16. EditText2 = (EditText) findViewById (R. id. editText2 );
  17. Button1 = (Button) findViewById (R. id. button1 );
  18.  
  19. FormHandler = new FormHandler (ViewsUtil. getAllEditTexts (this ));
  20. // Initialize the listener for changing the data and text, which must be placed after the assignment.
  21. FormHandler. initTextAndTextChangedListener ();
  22.  
  23. Button1.setOnClickListener (new OnClickListener (){
  24.  
  25. @ Override
  26. Public void onClick (View v ){
  27. If (formHandler. isTextChange () {// isTextChange
  28. TvChange. setText ("Change ");
  29. } Else {
  30. TvChange. setText ("Not Change ");
  31. }
  32. }
  33. });
  34.  
  35. }

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.