如何將imageview的大小減小到200x200?以編程方式減少ImageView的大小(使用java代碼)
這是我的實際代碼:
private ImageView splash;
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
FrameLayout fl = new FrameLayout(this.getApplicationContext());
splash = new ImageView(getApplicationContext());
splash.setImageResource(R.drawable.logo);
fl.addView(splash);
fl.setForegroundGravity(Gravity.CENTER);
fl.setBackgroundColor(Color.BLACK);
setContentView(fl);