开发者

how to get the full screen image in android

开发者 https://www.devze.com 2023-03-09 01:23 出处:网络
I displayed the image gallary .when I click on the image in the image gallary it will be displayed on the full screen .

I displayed the image gallary .when I click on the image in the image gallary it will be displayed on the full screen .

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(); });
}}


to let Activitty to open in full screen type this

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

And to remove the title bar type this

requestWindowFeature(Window.FEATURE_NO_TITLE);
0

精彩评论

暂无评论...
验证码 换一张
取 消