AFormChange v1.0, Android form value modification framework

AFormChange v1.0, Android form value modification framework

AFormChange is a free, open source, simple framework for processing Android form data changes, released under the Apache Licence 2.0 open source protocol, and is super easy to extend.
AFormChange android form value modification framework

AFormChange is a library, and you can directly export the jar package

AFormChangeDemo is a demonstration to quickly learn how to use AFormChange as a library

AValidations Use

1. Download the zip or clone the AFormChange project

2. Import into Eclipse, right click on the project->preference->Android->library->Add, select AFormChange project and add it, then apply the application

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 data and text change listeners, must be placed after assignment  
  21. formHandler.initTextAndTextChangedListener();
  22.  
  23. button1.setOnClickListener( new OnClickListener() {
  24.  
  25. @Override  
  26. public   void onClick(View v) {
  27. if (formHandler.isTextChange()) { //isTextChange determines whether it has changed  
  28. tvChange.setText( "Change" );
  29. } else {
  30. tvChange.setText( "Not Change" );
  31. }
  32. }
  33. });
  34.  
  35. }

<<:  Focusing on heart age, the world's first healthy heart watch UME Watch was launched in Beijing

>>:  UltimateAndroid 0.7.0 released, split UI module

Recommend

Are you choosing sunscreen right?

With the arrival of high temperatures in summer, ...

8 Brand Naming Formulas You Can Learn and Use Right Away

Although a brand name cannot determine the fate o...

Eleven Trends Predicted for New Consumer Brands in 2022

The collective rise of new consumer brands is und...

In order to grab territory, plants will "use violence" when fighting!

Produced by: Science Popularization China Author:...

How to use SMS to attract and recall lost users?

There are three common methods of user recall or ...

Share Button in Swift

Source code introduction: Share button written in...

Analysis: What’s so clever about Qutoutiao’s fission strategy?

In 2017, a dark horse, Qutoutiao, emerged in the ...

Why do telephone scams prefer using the 170 number?

After the three major operators started to impleme...