背景画像を含む画像ビューがあり、ImageView サイズに対して中央に配置された前景の「画像」として、テキストビューの上に ImageView を配置します。
selectedImageView = (ImageView) view.findViewById(R.id.selectedImage);
selectedImageView.setBackgroundResource(R.drawable.back_item);
selectedImageView.setImageResource(R.drawable.icon_alarm);
上記のコードは、前景の画像を ImageView のサイズに引き伸ばしますが、前景を背景の円の「内側」に配置したいと考えています。
パディングが使用されている場合、異なる画面サイズで問題が発生する可能性があります。
前景画像は、ImageView サイズの高さと幅の 50% にスケーリングする必要があり、textview は前景画像の下に配置する必要があります。
黒い外側の四角: 画像ビューの境界、黒い円: 背景画像、読み取り四角: 前景画像、青い長方形: 前景テキスト