我在绝对布局中设置了图像,但它不会在g1上全屏显示,但当我在nexus中运行相同的应用程序时,它工作正常。
我已经在我的活动类中设置了setContentView(新测试(this))。考试是我的绝对成绩。
我的代码如下:
public class Test extends AbsoluteLayout {public Test(Context context) {
super(context);
final RelativeLayout rl = new RelativeLayout(context);
final android.widget.RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(
LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);
rl.setLayoutParams(params);
this.addView(rl, new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT,
LayoutParams.FILL_PARENT));
ImageView mImageView = new ImageView(context);mImageView.setImageBitmap(((DataStorage)context.getApplicationContext()).getImage());
this.addView(mImageView); }}
有人能告诉我为什么我不能在G1手机屏幕上获得完整的图像吗?