public void initEmojiGrid( int mode, int perPage, int totalPage, int curPage, int numColumns, int gridViewWidth) { LogUtil.d( "EmojiGrid.initEmojiGrid mode:" + mode + " , perPage:" + perPage + " , totalPage:" + totalPage + " ,curPage:" + curPage); this.emojiMode = mode; this.perPage = perPage; this.totalPage = totalPage; this.curPage = curPage; this.numColumns = numColumns; this.gridViewWidth = gridViewWidth; if (numColumns == 7) { setColumnWidth(gridViewWidth / 7); } else { setColumnWidth(gridViewWidth / 14); } setNumColumns(numColumns); mEmojiApapter.updateEmoji(getPageEmoji(curPage)); }
void initEmojiLayout(Context context) { mEmojiApapter = new EmojiApapter(context); setLayoutParams( new ViewGroup.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)); setBackgroundResource(0); setSelector(new ColorDrawable(Color.TRANSPARENT)); setStretchMode(GridView.STRETCH_COLUMN_WIDTH); setGravity(Gravity.CENTER); switch (emojiMode) { case 21: mItemWidthInPix = DensityUtil.fromDPToPix(getContext(), 43); break; case 20: mItemWidthInPix = DensityUtil.fromDPToPix(getContext(), 80); break; default: break; } LogUtil.d("EmojiGrid.initEmojiLayout mItemWidthInPix:" + mItemWidthInPix); setColumnWidth(mItemWidthInPix); setAdapter(mEmojiApapter); setOnItemClickListener(this); int left = DensityUtil.fromDPToPix(getContext(), 6); int top = DensityUtil.fromDPToPix(getContext(), 6); int right = DensityUtil.fromDPToPix(getContext(), 6); LogUtil.d( "EmojiGrid.initEmojiLayout paddingLeft:" + left + " ,paddingRight:" + right + ",paddingTop:" + top); setPadding(left, top, right, 0); }
protected void doHandUpReleaseCall() { // Hang up the video call... LogUtil.d(TAG, "[VideoActivity] onClick: Voip talk hand up, CurrentCallId " + mCallId); try { if (mCallId != null) { VoIPCallHelper.releaseCall(mCallId); } } catch (Exception e) { e.printStackTrace(); } if (!isConnect) { finish(); } }