fresco

Android display images when offline once downloaded using fresco

荒凉一梦 提交于 2019-12-13 09:24:19
问题 I want fresco to download and save images to sd-card when connected to internet. Later when offline and even if cache is cleared, still I need fresco to show saved images. Is this possible? If yes, how? Simply saving images to disk cache doesnt seem to work when cache is cleared. 回答1: Fresco caches images for you. If you are offline, the images should still be displayed. You should not need to do anything. However, when the cache is cleared (e.g. when the user presses the button or when

Fresco: Images dissapear after scrolling RecylcerView

旧街凉风 提交于 2019-12-12 16:05:07
问题 I have a Horizontal RecyclerView: each item has an image loaded into it using the Facebook Fresco image library. However, while the correct image loads initially as it is scrolled a bit onto the screen, it disappears when the RecyclerView is scrolled further. In addition, there are issues where scrolling back and forth puts the wrong image in the wrong item (I assume this is an issue with recycling the viewholders). That said, the text you can see overlaying the items in the below screen shot

Using Fresco + S3 in Android

烂漫一生 提交于 2019-12-11 11:43:48
问题 I need a way to show several ( maybe 20-30 ) images on screen on an Android application i'm working on. Considerations: My images are stored in AWS S3. The list that displays these images is implemented using RecyclerView. After some research, i've decided to use Fresco to show and cache these images, but now i realize that i need a Uri from said S3 images. How can i accomplish this? Maybe using the newer TransferObserver.download(); and just display the images is better? But again, caching

React Native 0.60.0 & 0.60.x Android For animated GIF support

て烟熏妆下的殇ゞ 提交于 2019-12-11 06:25:31
问题 In latest version of React Native 0.60.x animated GIF is not working I am using following fresco version. compile 'com.facebook.fresco:fresco:1.10.0' compile 'com.facebook.fresco:animated-gif:1.10.0' 回答1: Use following it works for me for RN v0.60.3 implementation 'com.facebook.fresco:fresco:2.0.0' implementation 'com.facebook.fresco:animated-gif:2.0.0' 回答2: Change the version to 2.0.0 compile 'com.facebook.fresco:animated-gif:2.0.0' You don't need to use compile 'com.facebook.fresco:fresco:1

How to save image to sdcard when using Fresco?

独自空忆成欢 提交于 2019-12-10 17:45:34
问题 I am using Fresco to download and display Gifs in my app. I want to save the image to sdcard when click it, but i can't figure out how to do it. final View view = inflater.inflate(R.layout.fragment_gif_viewer, container, false); SimpleDraweeView draweeView = (SimpleDraweeView) view.findViewById(R.id.image); Uri uri = Uri.parse(imageUrl); DraweeController controller = Fresco.newDraweeControllerBuilder() .setUri(uri) .setAutoPlayAnimations(true) .build(); draweeView.setController(controller);

如何查看Gradle项目的依赖树情况-排查 Unable to merge dex问题

≯℡__Kan透↙ 提交于 2019-12-06 12:28:08
一、问题描述 今天在编写代码过程中,引入了一个组内新的封装库,导致编译冲突。如下所示: FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':demo:transformDexArchiveWithExternalLibsDexMergerForDebug'. > java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. * Get more help at https://help.gradle.org BUILD FAILED in 8s 51 actionable tasks: 13 executed, 38 up-to-date 1 2 3 4 5 6 7 8 9 10 11 12 13 点击 【Run with -

RecyclerView -- 给你一个不卡的滑动列表

耗尽温柔 提交于 2019-12-06 06:17:47
https://www.jianshu.com/p/519bb23987ca 看完此文章 你就会学到什么... RecyclerView添加头部,尾部,或list列表中某位置添加view RecyclerView+SwipeRefreshLayout 实现上下拉刷新效果 分页加载数据 列表优化方案 利用Glide加载图片,滑动的时候按back键,App会crash蹦掉处理。 添加依赖 //recyclerview compile 'com.android.support:recyclerview-v7:25.1.1' //glide compile 'com.github.bumptech.glide:glide:3.7.0' //butterknife 注意需要在三个第三添加代码 //1 module gradle里面底部添加 compile 'com.jakewharton:butterknife:8.5.1' annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1' //2 module gradle 里面顶部添加 apply plugin: 'com.jakewharton.butterknife' //3 在project gradle里面添加 dependencies { classpath

How to use Fresco to read any package's gif image in the assets directory

我们两清 提交于 2019-12-05 06:43:34
问题 I know how to read the gif image in local package assets directory. But now I need read other gif image in other package assets. for example the main APP com.aaa.app to read the com.bbb.app gif in assets. I know use try { context = this.createPackageContext("com.bbb.app", Context.CONTEXT_IGNORE_SECURITY); } catch (PackageManager.NameNotFoundException e) { e.printStackTrace(); } AssetManager am = context.getResources().getAssets(); try { InputStream is = am.open(fileName); image =

How I can update image of fresco SimpleDraweeView, if it was set once by setImageURI

徘徊边缘 提交于 2019-12-04 20:10:25
问题 I am using Facebook Fresco library and SimpleDraweeView for displaying avatar image from file: Uri avaURI = Uri.fromFile(new File(getCacheDir(), Constants.AVA_FILE_NAME)); simpleDrawee.setImageURI(avaURI); But what if I changed file with picture (deleted previous file and created the same one with new image), how can I update (refresh) SimpleDraweeView? Its still display the old version of image. (I tried to disable cache by Fresco.getImagePipeline().evictFromMemoryCache(avaURI); but it didn

Unity android project throws “Your hardware does not support this application sorry” error

陌路散爱 提交于 2019-12-04 14:49:29
问题 I have been investigating for 2 days. I have read a lot of things. To summarize what I read: Non-NEON devices will not work with UNITY 5 builds. You should set your Install Location to "Automatic or Force Internal" You should set your Write Access to "Internal Only" Along with the above ones, I also tried with these texture compression settings: Don't override DXT (Tegra) Also there are two cases that I tried: When I built the game from UNITY and generate an apk. It worked fine on the phone.