如何在android中获取全屏图像

时间:2011-05-30 13:44:49

标签: android android-layout android-emulator

我显示了图片库。当我点击图片库中的图片时,它将全屏显示。

Gallery g=(Gallery)findViewById(R.id.gallery);
            g.setAdapter(new ImageAdapter(this));
            g.setOnItemClickListener(new OnItemClickListener() {
                public void onItemClick(AdapterView parent, View v, int position, long id) {
                    Toast.makeText(sampledatabase.this, "" + position, Toast.LENGTH_SHORT).show(); });
}}

1 个答案:

答案 0 :(得分:1)

让Activitty以全屏模式打开

getWindow().setFlags(
                    WindowManager.LayoutParams.FLAG_FULLSCREEN,
                    WindowManager.LayoutParams.FLAG_FULLSCREEN);

要删除标题栏,请输入此

requestWindowFeature(Window.FEATURE_NO_TITLE);