android 短信下,添加聯系人,進入聯系人多選界面出現聯系人電話號碼晃動的問題

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();
       }
}

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *