Handler handler = new Handler(){ @Override public void handleMessage(Message msg) { super.handleMessage(msg); switch (msg.what) { case SCANNING: StringBuilder sb = (StringBuilder) msg.obj; tv_killvirus_info.setText(sb.toString()); sv.scrollBy(0, 25);//每次增加都会自动向下移动画面 break; case SCANNING_FINISH: int i = (Integer) msg.obj; StringBuilder sb1 = new StringBuilder(); sb1.append("扫描完毕 共扫描 "+ i+ " 个程序"); if(virusResult.size()>0){ sb1.append("发现病毒 \n"); for(String packname : virusResult){ sb1.append("病毒名"+ packname); sb1.append("\n"); } } tv_killvirus_info.setText(sb1.toString()); animationDrawable.stop(); break; } } };
Android杀毒实现原理及实例(2)
内容版权声明:除非注明,否则皆为本站原创文章。