关闭

拨号盘点击事件

522人阅读 评论(0) 收藏 举报

private EditText keyInputEditText;

keyInputEditText = (EditText)view.findViewById(R.id.key_input_textedit);

keyInputEditText.addTextChangedListener(this);

keyOneImageView.setOnClickListener(this);

case R.id.key_zero:
                KeyEvent keyEvent0 = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_0);
                keyInputEditText.onKeyDown(0, keyEvent0);
                break;

case R.id.key_delete_imageview:

               KeyEvent keyEvent10 = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DEL);
               keyInputEditText.onKeyDown(KeyEvent.KEYCODE_DEL, keyEvent10);
               break;

case R.id.key_call:
                dial();
                break;

 

如果 ContentProvider 的访问者需要知道 ContentProvider 中的数据发生了变化,可以在 ContentProvider 发生数据 变化时调用 getContentResolver().notifyChange(uri, null) 来通知注册在此 URI 上的访问者,例子如下:
public class PersonContentProvider extends ContentProvider {
public Uri insert(Uri uri, ContentValues values) {
db.insert("person", "personid", values);
getContext().getContentResolver().notifyChange(uri, null);
}
}

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场