我想用字母显示图像,gmail app如下图所示.

所有这些图像都是要保存在可绘制文件夹中的图像,还是将它们绘制成图形square shapes,然后将字母绘制到它们中?以下是我到目前为止动态做的事情.我只是一个方形.有人可以建议在gmail应用程序中实现的方式吗?
GradientDrawable gd = new GradientDrawable();
gd.mutate();
gd.setColor(getResources().getColor(gColors[i]));
button.setBackgroundDrawable(gd);
Run Code Online (Sandbox Code Playgroud) 我这里有问题.我没有得到完美的输出.以下是我为编写Sudoku而编写的代码.即使我知道它的原因,因为它无法创建任何新的唯一编号,它打印默认值为0.我知道我错过了一些我无法想到的东西.任何人都可以建议一个解决方案吗?提前致谢.
public class FinalSudoku
{
int a[][]=new int[9][9];
public void initialize1()
{
for(int i=0;i<9;i++)
{
for(int j=0;j<9;j++)
{
a[i][j]=0;
}
}
}
protected boolean detectRow( int row, int num )
{
for( int col = 0; col < 9; col++ )
if( a[row][col] == num )
return false;
return true ;
}
protected boolean detectCol( int col, int num )
{
for( int row = 0; row < 9; row++ )
if( a[row][col] == num )
return false ;
return …Run Code Online (Sandbox Code Playgroud)