开发者

Can't understand why my code not working (easy ui)

开发者 https://www.devze.com 2023-03-09 00:14 出处:网络
hello guys i have this function for focus : fav[jj].setOnFocusChangeListener(new View.OnFocusChangeListener() {

hello guys i have this function for focus :

fav[jj].setOnFocusChangeListener(new View.OnFocusChangeListener() {
                public int kl = jj;
                @Override
                public void onFocusChange(View v, boolean hasFocus) {
                 log("last = "+last);
                     log("kkk = "+kl);  
                     saver ssss = new saver();
                 if(v.hasFocus())
                    {
                     if(kl+1 ==ssss.loadCount())
     开发者_如何学编程                {
                         log("hjere");
                            delete.setEnabled(true);
                            btnUp.setEnabled(false);
                            btnDown.setEnabled(false);
                            btnGo.setEnabled(true);
                            btnDown.setImageResource(R.drawable.notactivedown);
                            btnUp.setImageResource(R.drawable.arrowup);
                            log("here naxxx");
                     }
                    }

when i touched on my object fav[n] .. than this function must set button status to false. But this not work.. i can't understand because in logcat i see two lines : log("hjere"); and log("here naxxxx"); if i see ("log("here naxxx") ) than code must work ??

can any one please tell me why my code don't want work ? :(

Regards , Peter.


I would use an OnClickListener for that I think.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号