chathuralakmal / androidimagepopup Goto Github PK
View Code? Open in Web Editor NEWSimple android image popup Library
Simple android image popup Library
even after setting imagePopup.setWindowWidth(0);
imagePopup.setWindowHeight(0);
Image opens up occupying the full activity
think the lib need to add function to auto fit whole screen and it take boolean to check if make it or not
this code will get the width and height for the screen
DisplayMetrics displayMetrics = new DisplayMetrics(); ((Activity) context).getWindowManager().getDefaultDisplay().getMetrics(displayMetrics); int height = displayMetrics.heightPixels; int width = displayMetrics.widthPixels;
i'm busy nowadays if i got free and you didn't make it yet i hope i will make it or it is already exist and i don't know
please mark this issue as enhancement i don't know how , i think it can made by the author only
Android version: API 21
AndroidImagePopup version: 1.0.6
Error: java.lang.OutOfMemoryError
Image size: 3.5MB
Code: (Is in fragment)
`ImagePopUp imagePopup = new ImagePopup(Avisos.getActivity());
imagePopup.setBackgroundColor(Color.BLACK);
imagePopup.setWindowWidth(800);
imagePopup.setWindowHeight(800);
imagePopup.setHideCloseIcon(true);
imagePopup.setImageOnClickClose(true);
imageView = new ImageView(getActivity());
filePath = data.getData();
imagePopup.setImageURI(filePath);`
Error:(45, 20) Failed to resolve: com.github.chathuralakmal:AndroidImagePopup:1.2.1
I m setting image from gallery to image View and i m using this library to popup the image which set in image view but while clicking the image in popup it showing fully blank
so what to do to show the image..????
your reply will be more useful for me
my code :
final ImagePopup imagePopup = new ImagePopup(this);
imagePopup.setWindowHeight(800); // Optional
imagePopup.setWindowWidth(800); // Optional
imagePopup.setBackgroundColor(Color.WHITE); // Optional
//imagePopup.setFullScreen(true); // Optional
imagePopup.setHideCloseIcon(true); // Optional
imagePopup.setImageOnClickClose(true); // Optional
imagePopup.initiatePopup(img.getDrawable());
img.setOnClickListener(new View.OnClickListener() {
@OverRide
public void onClick(View view) {
//openGallery();
imagePopup.viewPopup();
How I can detect when user clicks on x Close button and close full screen image dialog?
Hello,
When my popup appear it not image see, only blank ?
....
Hello it will be awesome if we can add zoom feature for the lib so can see more details on small pics
Cannot make outside window dimmer and how to make roundcorner for the imagepopup view?
Not working with the following code, which is being called when clicking a "clickable textview". I am not using any ImageView to get the drawable rather I am getting the drawable directly from image file, which is present in the resource.
ImagePopup imagePopup = new ImagePopup(SettingsActivity.this);
imagePopup.initiatePopup(ResourcesCompat.getDrawable(getResources(),R.drawable.iris_setup_width_height_vals, null));
Causes fail of Manifest merger:
> Manifest merger failed : Attribute application@label value=(@string/label_application) from AndroidManifest.xml:16:7-48
is also present at [com.github.chathuralakmal:AndroidImagePopup:1.0.6] AndroidManifest.xml:13:9-41 value=(@string/app_name).
Suggestion: add 'tools:replace="android:label"' to <application> element at AndroidManifest.xml:6:3-8:37 to override.```
How to resolve this error ? I'm using Glide when I click the Image it Show error
java.lang.NoSuchMethodError: No virtual method into(Landroid/widget/ImageView;)Lcom/bumptech/glide/request/target/Target; in class Lcom/bumptech/glide/RequestBuilder; or its super classes (declaration of 'com.bumptech.glide.RequestBuilder' appears in
When using imagePopup.initiatePopupWithPicasso(fileUrl) I am receiving this fatal exception:
java.lang.NoSuchMethodError: No static method with(Landroid/content/Context;)Lcom/squareup/picasso/Picasso; in class Lcom/squareup/picasso/Picasso; or its super classes (declaration of 'com.squareup.picasso.Picasso' appears in /data/app/com.removed.removed-m5CwqzHTFNXBaULIcLeNRQ==/split_lib_dependencies_apk.apk!classes2.dex) at com.ceylonlabs.imageviewpopup.ImagePopup.initiatePopupWithPicasso(ImagePopup.java:143) at com.removed.removed.fragments.LiveFragment$setImage$1.onClick(LiveFragment.kt:366)
I am using 'com.squareup.picasso:picasso:2.71828'
The library is working fine when I use imagePopup.initiatePopup(addMediaButton.drawable)
the app blocks if I put this in it.
imagePopup.initiatePopupWithPicasso(messages.getMessage());
I've already tried everything.
casting error at at com.ceylonlabs.imageviewpopup.ImagePopup.initiatePopup(ImagePopup.java:156)
/** Background dim part **/
WindowManager windowManager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
WindowManager.LayoutParams layoutParams = (WindowManager.LayoutParams) layout.getLayoutParams();
layoutParams.flags = WindowManager.LayoutParams.FLAG_DIM_BEHIND;
layoutParams.dimAmount = 0.3f;
windowManager.updateViewLayout(layout, layoutParams);
}catch (Exception e){
e.printStackTrace();
}
initiatePopupWithGlide Exception
I noticed that the default popupwindow size always retain the default size even if the windows dimension were set .
imagePopup.setWindowWidth(xxx);
imagePopup.setWindowHeight(xxx);
Line 127 popupWindow = new PopupWindow(layout, (int)(width.8),(int)(height.6), true);**
there is possible to show ImagePopup with animation ?
when the main activity that shows the popup in a AppCompatActivity, there's the following ex:
java.lang.ClassCastException: android.app.ContextImpl cannot be cast to android.app.Activity
at com.ceylonlabs.imageviewpopup.ImagePopup.viewPopup(ImagePopup.java:228)
Environment
JDK 8
Execution failed for task ':app:checkDebugDuplicateClasses'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
> Duplicate class android.support.v4.app.INotificationSideChannel found in modules core-1.6.0-runtime (androidx.core:core:1.6.0) and support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1)
Duplicate class android.support.v4.app.INotificationSideChannel$Stub found in modules core-1.6.0-runtime (androidx.core:core:1.6.0) and support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1)
Duplicate class android.support.v4.app.INotificationSideChannel$Stub$Proxy found in modules core-1.6.0-runtime (androidx.core:core:1.6.0) and support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1)
Duplicate class android.support.v4.os.IResultReceiver found in modules core-1.6.0-runtime (androidx.core:core:1.6.0) and support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1)
Duplicate class android.support.v4.os.IResultReceiver$Stub found in modules core-1.6.0-runtime (androidx.core:core:1.6.0) and support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1)
Duplicate class android.support.v4.os.IResultReceiver$Stub$Proxy found in modules core-1.6.0-runtime (androidx.core:core:1.6.0) and support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1)
Duplicate class android.support.v4.os.ResultReceiver found in modules core-1.6.0-runtime (androidx.core:core:1.6.0) and support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1)
Duplicate class android.support.v4.os.ResultReceiver$1 found in modules core-1.6.0-runtime (androidx.core:core:1.6.0) and support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1)
Duplicate class android.support.v4.os.ResultReceiver$MyResultReceiver found in modules core-1.6.0-runtime (androidx.core:core:1.6.0) and support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1)
Duplicate class android.support.v4.os.ResultReceiver$MyRunnable found in modules core-1.6.0-runtime (androidx.core:core:1.6.0) and support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1)
I really wanted to try this library, but somehow, I can't use it because it has failed to Resolve Issue on Gradle Synchronization.
Using .setOnTouchListener() on the ImagePopup object does not seem to work - the the code within the OnTouchListener is never reached.
To try counter this, I tried manually pulling the files from this repository and creating my own custom ImagePopup class, adding the .setOnTouchListener() to the 'layout' field object. While that did execute the code correctly, the popup wouldn't go fullscreen so I abandoned whole custom class.
I'm a rookie at this, anyone know what I might be doing wrong? Would being able to access the layout field within the ImagePopup object in order to add the .setOnTouchListener() directly to it be bad code? I'm guessing that would solve my issue, at least.
what I'm trying to do:
imagePopup.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
//This code is never reached
return false;
}
});
Also, what I'm aiming to do is when the user scrolls up or down on the imagePopup, the image source changes, creating a controllable gif-like effect. Provided I figure out how to detect the scroll, is there a way to change the image source in this manner?
I try to set the window size as the full screen. But it doesn't work, it seems the half of the screen.Here's the code.
final ImagePopup imagePopup = new ImagePopup(getActivity()); imagePopup.setWindowWidth(Resources.getSystem().getDisplayMetrics().widthPixels); imagePopup.setWindowHeight(Resources.getSystem().getDisplayMetrics().heightPixels); imagePopup.setBackgroundColor(Color.BLACK); imagePopup.setHideCloseIcon(true); imagePopup.setImageOnClickClose(true); imagePopup.initiatePopup(imageView.getDrawable());
image pops up as a very tiny image in the center of the screen no matter what is defined in setwindowheight/setwindowwidth
using a galaxy note 5
Getting this error Error:Could not find com.github.chathuralakmal:AndroidImagePopup:1.0.6. Required by: project :app <a href="searchInBuildFiles">Search in build.gradle files</a>
I am doing every this as shown here but when I click the image it shows popup without the image
in log cat there is no error.
can you help me, please
Hello,
When I test to a smartphone with small screen (5'), the popup appear good but not the popup is too big and not see the image to close it and can't use aplication, must finishe and restart it.
Thanks for help
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.