5 6 03) The following piece of code is designed to show a toast with each Action Up event. But, it shows nothing. Find a

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

5 6 03) The following piece of code is designed to show a toast with each Action Up event. But, it shows nothing. Find a

Post by answerhappygod »

5 6 03 The Following Piece Of Code Is Designed To Show A Toast With Each Action Up Event But It Shows Nothing Find A 1
5 6 03 The Following Piece Of Code Is Designed To Show A Toast With Each Action Up Event But It Shows Nothing Find A 1 (42.67 KiB) Viewed 71 times
5 6 03) The following piece of code is designed to show a toast with each Action Up event. But, it shows nothing. Find and explain the problem, then fix it. (7m) 1view.setOnTouchListener(new view.OnTouchListener() { 2 @Override 3 public boolean onTouch(view v, MotionEvent event) { 4 boolean flag-true; int action - event.getActionMasked(); if(action -- MotionEvent.ACTION_DOWN) { // some code goes here flag-flag; 9 if (action -- MotionEvent.ACTION_UP){ Toast.makeText(self,"Action Up", Toast.LENGTH_SHORT).show(); flag flagi } return flag; 15 ) 16}); 10 11 12 13 14
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply