本文整理汇总了Java中com.netease.nim.uikit.common.util.media.ImageUtil.getBoundWithLength方法的典型用法代码示例。如果您正苦于以下问题:Java ImageUtil.getBoundWithLength方法的具体用法?Java ImageUtil.getBoundWithLength怎么用?Java ImageUtil.getBoundWithLength使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.netease.nim.uikit.common.util.media.ImageUtil
的用法示例。
在下文中一共展示了ImageUtil.getBoundWithLength方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: bindContentView
import com.netease.nim.uikit.common.util.media.ImageUtil; //导入方法依赖的package包/类
@Override
protected void bindContentView() {
final LocationAttachment location = (LocationAttachment) message.getAttachment();
addressText.setText(location.getAddress());
int[] bound = ImageUtil.getBoundWithLength(getLocationDefEdge(), R.drawable.nim_location_bk, true);
int width = bound[0];
int height = bound[1];
setLayoutParams(width, height, mapView);
setLayoutParams(width, (int) (0.38 * height), addressText);
mapView.loadAsResource(R.drawable.nim_location_bk, R.drawable.nim_message_item_round_bg);
}
示例2: bindContentView
import com.netease.nim.uikit.common.util.media.ImageUtil; //导入方法依赖的package包/类
@Override
protected void bindContentView() {
final LocationAttachment location = (LocationAttachment) message.getAttachment();
addressText.setText(location.getAddress());
int[] bound = ImageUtil.getBoundWithLength(getLocationDefEdge(), R.drawable.nim_location_bk, true);
int width = bound[0];
int height = bound[1];
setLayoutParams(width, height, mapView);
setLayoutParams(width, (int) (0.38 * height), addressText);
mapView.loadAsResource(R.drawable.nim_location_bk, width, height, R.drawable.nim_message_item_round_bg);
}