android 短信下,添加联系人,进入联系人多选界面出现联系人电话号码晃动的问题

来源:互联网 发布:淘宝指数哪些网站 编辑:程序博客网 时间:2024/04/26 04:08
1.       Launch MMS,新建message;
2.       点击右上角“添加联系人” icon, 进入到联系人多选界面;
3.       选择右侧的联系人复选框时,可以看到联系人list上,电话号码在晃动。
 
  首先找到contacts源码包下的ContactListItemView.java文件
  然后找到onMeasure()方法,如下:
@Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec){
        在此方法体内,请将原来的代吗:
        if (isVisible(mLabelView)) {
            mLabelView.measure(0, 0);
            mLine2Height = mLabelView.getMeasuredHeight();
        }
改为:
        /** M: Need to measure natural dimension if the view's width is equal to 0.*/
        if (isVisible(mLabelView) && mLabelView != null
                && (mLabelView.getMeasuredWidth() == 0)) {
            mLabelView.measure(0, 0);
            mLine2Height = mLabelView.getMeasuredHeight();
       }
}