Search in sources :

Example 1 with SearchFragment

use of org.aisen.weibo.sina.ui.fragment.search.SearchFragment in project AisenWeiBo by wangdan.

the class TimelineItemView method setUserInfo.

private void setUserInfo(WeiBoUser user, TextView txtName, ImageView imgPhoto, ImageView imgVerified) {
    if (user != null) {
        txtName.setText(AisenUtils.getUserScreenName(user));
        if (imgPhoto != null) {
            BitmapLoader.getInstance().display(fragment, AisenUtils.getUserPhoto(user), imgPhoto, ImageConfigUtils.getLargePhotoConfig());
            if (fragment instanceof SearchFragment) {
                imgPhoto.setTag(user);
                imgPhoto.setOnClickListener(searchProfileOnClickListener);
            } else {
                bizFragment.userShow(imgPhoto, user);
            }
        }
        AisenUtils.setImageVerified(imgVerified, user);
    } else {
        if (imgPhoto != null) {
            imgPhoto.setImageDrawable(new ColorDrawable(Color.GRAY));
            bizFragment.userShow(imgPhoto, null);
        }
        imgVerified.setVisibility(View.GONE);
    }
}
Also used : ColorDrawable(android.graphics.drawable.ColorDrawable) SearchFragment(org.aisen.weibo.sina.ui.fragment.search.SearchFragment)

Aggregations

ColorDrawable (android.graphics.drawable.ColorDrawable)1 SearchFragment (org.aisen.weibo.sina.ui.fragment.search.SearchFragment)1