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

Four signs that Apple is declining

[[144032]] Apple's stock price fell 2% this m...

The three-way handshake and four-way wave process of TCP protocol

1. TCP/IP protocol suite TCP/IP is a protocol fam...

WeChat, Alipay, Baidu, Toutiao: The future battle of the "F4" of mini programs

People always overestimate the changes in the nex...

2019 Unofficial Survival Guide for New Media Operations!

New media operation is not easy, and everyone who...

MediaTek painstakingly builds Helio X30: completely defeated by Snapdragon 835

In 2017, a new round of smartphone wars is slowly ...

How to attract new customers?

This article mainly focuses on how to achieve gro...

iPhone 6C leak is not a failure, it is good for Apple

On May 31, Forbes Online published an article sig...