@Amadan, , imageViews , , , , AbsoluteLayout:
public class drawCirPicture extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
AbsoluteLayout ab =(AbsoluteLayout) findViewById(R.id.a1);
float centerY = 200;
float centerX=130;
double alpha = 0,wedge=0;
double PI=Math.PI;
float x,y;
int radius=55;
InputStream is = getResources().openRawResource(R.drawable.ic_jog_dial_unlock);
Bitmap mBitmap = BitmapFactory.decodeStream(is);
for (alpha = 0, wedge = 2 * PI / 5; alpha < 2 * PI; alpha += wedge)
{
x = (float) (centerX + radius * Math.cos(alpha));
y = (float) (centerY + radius * Math.sin(alpha));
ImageView iv =new ImageView(this);
iv.setImageBitmap(mBitmap);
iv.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(drawCirPicture.this, "a", 1000).show();
}
});
ab.addView(iv,new AbsoluteLayout.LayoutParams(mBitmap.getWidth(), mBitmap.getHeight(),(int) x,(int) y));
}
}
, , , centerX = 5, centery = 10, , , , ,