Skip to content

Practical work 2. In the discipline of Mobile application development

License

Notifications You must be signed in to change notification settings

gomarmadi/GMB05_lab02_AndroidStudio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GMB05_lab02_AndroidStudio

Practical work 2. In the discipline of Mobile application development

Screenshot

Обработчик на события нажатий клавиш

View.OnKeyListener myKeyListener = new View.OnKeyListener() {
            @Override
            public boolean onKey(View view, int i, KeyEvent keyEvent) {
                if (editText_a.getText().toString().trim().equals("") ||
                        editText_b.getText().toString().trim().equals("") ||
                editText_x.getText().toString().trim().equals(""))  {
                    button.setEnabled(false);
                } else {
                    button.setEnabled(true); 
                }
                return false;
            }
        };
        button.setEnabled(false); 
        editText_a.setOnKeyListener(myKeyListener); 
        editText_b.setOnKeyListener(myKeyListener); 
        editText_x.setOnKeyListener(myKeyListener);

Teacher: https://github.com/proffix4

About

Practical work 2. In the discipline of Mobile application development

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages