예제 #1
0
  public ChatmsgsListViewAdapter(
      Context context, List<MessageChatBean> chatmsgsList, Handler handler) {
    this.mContext = context;
    this.chatmsgsList = chatmsgsList;
    this.handler = handler;

    mMaxItemWidth = DisplayUtils.getWindowWidth(mContext) - DensityUtil.dip2px(mContext, 110);
    mMinItemWidth = DensityUtil.dip2px(mContext, 44);

    if (currentUser != null) {
      user = AVUser.cast(currentUser, ObjUser.class);
    }

    MyApplication app = (MyApplication) context.getApplicationContext();
    finalBitmap = app.getFinalBitmap();
    bitmapUtils = new BitmapUtils(context.getApplicationContext());
    userDao = new UserDao(context);
    loadBitmap =
        BitmapFactory.decodeResource(
            mContext.getResources(), R.drawable.mine_likelist_profile_default);
  }