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
- Private TextView tvChange;
- Private EditText editText1;
- Private EditText editText2;
-
- Private Button button1;
-
- Private FormHandler formHandler;
-
- @ Override
- Protected void onCreate (Bundle savedInstanceState ){
- Super. onCreate (savedInstanceState );
- SetContentView (R. layout. activity_main );
-
- TvChange = (TextView) findViewById (R. id. TV _change );
- EditText1 = (EditText) findViewById (R. id. editText1 );
- EditText2 = (EditText) findViewById (R. id. editText2 );
- Button1 = (Button) findViewById (R. id. button1 );
-
- FormHandler = new FormHandler (ViewsUtil. getAllEditTexts (this ));
- // Initialize the listener for changing the data and text, which must be placed after the assignment.
- FormHandler. initTextAndTextChangedListener ();
-
- Button1.setOnClickListener (new OnClickListener (){
-
- @ Override
- Public void onClick (View v ){
- If (formHandler. isTextChange () {// isTextChange
- TvChange. setText ("Change ");
- } Else {
- TvChange. setText ("Not Change ");
- }
- }
- });
-
- }