How to show imageView full screen on imageView click?

后端 未结 10 632
暖寄归人
暖寄归人 2020-12-02 08:41

I am getting images from url and showing it on the imageView. This functionality is working properly. But I want that when I click on that image, then it must be full screen

10条回答
  •  萌比男神i
    2020-12-02 09:13

    Yes I got the trick.

    public void onClick(View v) {
    
                if( Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH ){
                    imgDisplay.setSystemUiVisibility( View.SYSTEM_UI_FLAG_HIDE_NAVIGATION );
    
                }
                else if( Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB )
                    imgDisplay.setSystemUiVisibility( View.STATUS_BAR_HIDDEN );
                else{}
    
        }
    

    But it didn't solve my problem completely. I want to hide the horizontal scrollview too, which is in front of the imageView (below), which can't be hidden in this.

提交回复
热议问题