Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8481661
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T19:37:02+00:00 2026-06-10T19:37:02+00:00

When I click on a thumbnail, a popup window opens. I want to dismiss

  • 0

When I click on a thumbnail, a popup window opens. I want to dismiss it in the onTouch method but the problem is that the onTouch method is not getting called.So How can i get it run? How can I dismiss the popup window?

my code is:

public void onItemImageClicked(View view)
{
    LinearLayout layout = (LinearLayout)     getLayoutInflater().inflate(R.layout.popup,null); 
    ImageView fullSizeImg = (ImageView) layout.findViewById(R.id.fullSizeImage);
    fullSizeImg.setImageBitmap(bitmap);
    fullSizeImg.setFocusable(false);
    Display display = getWindowManager().getDefaultDisplay(); 
    int deviceWidth = display.getWidth()-40; 
    int deviceHeight = display.getHeight()-70; 
    popupWindow = new PopupWindow(layout, deviceWidth, deviceHeight, true);
    // display the popup in the center
    popupWindow.showAtLocation(layout, Gravity.CENTER, 0, 0);
    popupWindow.getMaxAvailableHeight(new View(this));
    popupWindow.setFocusable(true);
    popupWindow.setTouchInterceptor(new View.OnTouchListener() {

        @Override
        public boolean onTouch(View v, MotionEvent event) {
            // TODO Auto-generated method stub
            popupWindow.dismiss();
            return false;
        }
    });
    popupWindow.setTouchable(true);

}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T19:37:04+00:00Added an answer on June 10, 2026 at 7:37 pm

    Try this

                    View popupView = globalconstant.layoutInflater.inflate(R.layout.popup, null);  
                    popupWindow = new PopupWindow(popupView,globalconstant.displayWidth-20,480,true);
                    popupWindow.setOutsideTouchable(true);
                    popupWindow.setBackgroundDrawable(new BitmapDrawable());
    

    And onClickEvent

    popupWindow.showAtLocation(v, Gravity.CENTER, 0, 15);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want that when user click on image thumbnil then the image popup just
I have a list of thumbnails. When I click on a thumbnail, I want
I am looking for one of those scripts that when you click a Thumbnail,
So I have the code: function randomClick(interval){ $(.thumbnail_holder .nav li:not(.empty):eq(+select+) a).trigger(click); window.randomTimer = setTimeout(randomClick(+interval+),
I have seen a few sites that have a thumbnail and when you click
Here is my code: $('#gallery-listA li.thumbnail').click(function() { $(this).addClass('chosen'); $('') $('#gallery-listA li.thumbnail').not(this).addClass('notchosenA'); $('#gallery-listB li.thumbnail').addClass('notchosenB'); $('.notchosenB').fadeTo(500,0.0)
I want to display full screen of a image when i click on thumbnail
I have a page of several videos. One can click a thumbnail to play
My website has a main image that changes depending on what thumbnails you click
click the button to call this method: private void goRegister(final boolean isUsername) { new

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.