摘要: 使用 Button 时为了让用户有“按下”的效果,有两种实现方式: 1.JAVA代码实现: imageButton.setOnTouchListener(new OnTouchListener(){ @Override public boolean onTouch(View v, MotionEvent event) { if(event.getAction() == MotionEvent.ACTION_DOWN... 阅读全文
posted @ 2014-02-16 19:54 无敌小龙 阅读(623) 评论(0) 推荐(0) 编辑
摘要: 简单点说,哪个线程new Handler()了当前这个对象,handerl就会处理哪个线程。所以,android UI线程里创建了一个Handler,再用次handler来更改UI,就会没有问题额。 1 package com.example.fd; 2 3 import android.app.Activity; 4 import android.os.Bundle; 5 import android.os.Handler; 6 import android.os.Message; 7 import android.view.Menu; 8 import android.view.View. 阅读全文
posted @ 2014-02-16 19:13 无敌小龙 阅读(232) 评论(0) 推荐(0) 编辑