本文整理了Java中android.widget.ImageView.getContentDescription()
方法的一些代码示例,展示了ImageView.getContentDescription()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ImageView.getContentDescription()
方法的具体详情如下:
包路径:android.widget.ImageView
类名称:ImageView
方法名:getContentDescription
暂无
代码示例来源:origin: stackoverflow.com
ImageView img = (ImageView) findViewById(R.id.imageView);
String imageName = img.getContentDescription();
代码示例来源:origin: stackoverflow.com
protected void onSetDragTarget(View v) {
ImageView b = (ImageView) v;
int x = Character.getNumericValue(b.getContentDescription().charAt(0));
int y = Character.getNumericValue(b.getContentDescription().charAt(1));
bitmap = InGameActivity.currentBoardState[x][y].getPicture();
width = bitmap.getWidth();
代码示例来源:origin: WhiteDG/BihuDaily
@Override
public void onClick(View view) {
// 假装点赞
if (likeImg.getContentDescription().equals("praise")) {
likeImg.setContentDescription("praised");
likeImg.setImageResource(R.drawable.praised);
// Integer likeNum = Integer.valueOf(likeText.getText().toString());
// likeText.setText(likeNum + 1 + "");
showToast("赞+1");
} else {
likeImg.setContentDescription("praise");
likeImg.setImageResource(R.drawable.praise);
Integer likeNum = Integer.valueOf(likeText.getText().toString());
likeText.setText(likeNum - 1 + "");
showToast("赞-1");
}
}
});
内容来源于网络,如有侵权,请联系作者删除!