On clicking image, image should open in full screen in android. I am using flip view pager from GitHub. I got all the layout and functionality same as in the GitHub link. But I want to add further function to open image in full screen as dialog over the same screen.
    final ListView friends = (ListView) inflater.inflate(R.layout.activity_friends,container,false);
    FlipSettings settings=new FlipSettings.Builder().defaultPage(1).build();
    friends.setAdapter(new FriendsAdapter(getActivity(), Utils.friends,settings));
    friends.setOnItemClickListener(new AdapterView.OnItemClickListener() {
        @Override
        public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
            Friend friend = (Friend) friends.getAdapter().getItem(position);
                    final Dialog nagDialog = new Dialog(getActivity(),android.R.style.Theme_Translucent_NoTitleBar_Fullscreen);
                    nagDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
                    nagDialog.setCancelable(false);
                    nagDialog.setContentView(R.layout.preview_image);
                    Button btnClose = (Button)nagDialog.findViewById(R.id.btnIvClose);
                   //ImageView ivPreview = (ImageView)nagDialog.findViewById(R.id.first);
                    //ivPreview.setBackground(dd);
                    btnClose.setOnClickListener(new View.OnClickListener() {
                        @Override
                        public void onClick(View arg0) {
                            nagDialog.dismiss();
                        }
                    });
                    nagDialog.show();
            Toast.makeText(getContext(), friend.getNickname(), Toast.LENGTH_SHORT).show();
        }
    });
     return friends;
https://github.com/Yalantis/FlipViewPager.Draco
Please find the above link for the whole code.
 
    