picasso

Picasso: out of memory

匿名 (未验证) 提交于 2019-12-03 01:23:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a RecyclerView presenting several images using Picasso . After scrolling some time up and down the application runs out of memory with messages like this: E/dalvikvm-heap: Out of memory on a 3053072-byte allocation. I/dalvikvm: "Picasso-/wp-content/uploads/2013/12/DSC_0972Small.jpg" prio=5 tid=19 RUNNABLE I/dalvikvm: | group="main" sCount=0 dsCount=0 obj=0x42822a50 self=0x59898998 I/dalvikvm: | sysTid=25347 nice=10 sched=0/0 cgrp=apps/bg_non_interactive handle=1500612752 I/dalvikvm: | state=R schedstat=( 10373925093 843291977 45448 )

Dagger2 Custom Scopes : How do custom-scopes (@ActivityScope) actually work?

匿名 (未验证) 提交于 2019-12-03 01:23:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am reading the source code for Dagger2 Component Scopes Test on GitHub, and I've seen a "custom scope" defined for activities called @ActivityScope , but I've seen it in other projects including the 4-module CleanArchitecture that has its @PerActivity scope. But literally, the code for the @ActivityScope annotation is the following: import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import javax.inject.Scope; /** * Created by joesteele on 2/15/15. */ @Scope @Retention(RetentionPolicy.RUNTIME) public

Multiple dex files define Landroid/arch/lifecycle/LiveData$LifecycleBoundObserver;

匿名 (未验证) 提交于 2019-12-03 01:06:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: when run app it show error Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'. java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex build.gradle dependencies { implementation 'com.android.support.constraint:constraint-layout:1.0.2' compile('com.mapbox.mapboxsdk:mapbox-android-navigation-ui:0.6.2') { transitive = true } compile 'com.mapbox.mapboxsdk:mapbox-android-navigation:0.6.2' compile 'com.google.firebase:firebase-auth:11.6.0' compile 'com.google

Multiple dex files define Landroid/support/design/widget/CoordinatorLayout$1;

匿名 (未验证) 提交于 2019-12-03 01:05:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Whenever I want to run my project i get the following error Error:Execution failed for task ':app:transformClassesWithDexForDebug'. com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Landroid/support/design/widget/CoordinatorLayout$1; apply plugin: 'com.android.application' android { compileSdkVersion 27 buildToolsVersion "27.0.2" defaultConfig { applicationId "com.example.invinciblesourav.flacom"

Make ImageView with Round Corner Using picasso

梦想的初衷 提交于 2019-12-03 01:03:17
I know there are lots of link available to make ImageView Round Corner. But I'm Using Picasso Library for Image Loading.. I refer the link to get result. But the Problem is that I'm Using it in ListView and for the LIstView's first item ImageView its working perfectly fine but for the remaining once transformation is not working. I am using this transformation: https://gist.github.com/julianshen/5829333 Picasso.with(activity).load(url).transform(new CircleTransform()).into(imageView); You can use RoundedCornersTransformation class of picasso-transformations library. Example : final int radius

Picasso + RxJava2: Method call should happen from the main thread

匿名 (未验证) 提交于 2019-12-03 00:56:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: This was my initial Question: I am trying to show a few images in the AutoScrollViewPager . I am using Picasso to achieve the same. However, I would like to do the same with using Rxjava2 + Picasso. I am kinda new to this RxJava concept. So if anyone can help me with details if possible, to convert the below into RxJava code, I would really appreciate it. This is what I do in onViewCreated() imageAdapter = new ImageAdapter(getActivity()); autoScrollViewPager.setAdapter(imageAdapter); autoScrollViewPager.setCurrentItem(imageAdapter.getCount()

Picasso:开启大前端的未来

匿名 (未验证) 提交于 2019-12-03 00:34:01
“道生一,一生二,二生三,三生万物。” ―― 《道德经》 Picasso是大众点评移动研发团队自研的高性能跨平台动态化框架,经过两年多的孕育和发展,目前在美团多个事业群已经实现了大规模的应用。 Picasso源自我们对大前端实践的重新思考,以简洁高效的架构达成高性能的页面渲染目标。在实践中,甚至可以把Native技术向Picasso技术的迁移当做一种性能优化手段;与此同时,Picasso在跨越小程序端和Web端方面的工作已经取得了突破性进展,有望在四端(Android、iOS、H5、微信小程序)统一大前端实践的基础之上,达成高性能大前端实践,同时配合Picasso布局DSL强表达能力和Picasso代码生成技术,可以进一步提升生产力。 2007年,苹果公司第一代iPhone发布,它的出现“重新定义了手机”,并开启了移动互联网蓬勃发展的序幕。Android、iOS等移动技术,打破了Web应用开发技术即将一统江湖的局面,之后海量的应用如雨后春笋般涌现出来。移动开发技术给用户提供了更好的移动端使用和交互体验,但其“静态”的开发模式却给需要快速迭代的互联网团队带来了沉重的负担。 客户端开发技术与Web端开发技术相比,天生带有“静态”的特性,我们可以从空间和时间两个维度来看。 从空间上看需要集成发布 ,美团App承载业务众多,是跨业务合流,横向涉及开发人员最多的公司

Weex初体验之图片适配器

匿名 (未验证) 提交于 2019-12-03 00:30:01
图片适配器 Weex使用Image控件加载图片,但是并不能直接显示出来图片,主要还是要Native端实现图片加载,本人使用 Picasso 加载图片 compile 'com.squareup.picasso:picasso:2.5.2' 其次创建 ImageAdapter类, 实现IWXImgLoaderAdapter接口,在setImage方法中实现图片加载逻辑 public class ImageAdapter implements IWXImgLoaderAdapter { public ImageAdapter() { } @Override public void setImage(final String url, final ImageView view, WXImageQuality quality, final WXImageStrategy strategy) { } 在本类中,可以加载本地图片和网络图片: 本人在传递相机拍照或者选择图库的图片地址给Weex时,先在图片路径前面增加一个 标记头, 便于区分是本地图片还是网络图片 //Picasso 加载本地图片时,必须加载"file://"文件头,不能加载不出图片 本地写好图片适配器后,则要告诉Weex用我写好的图片适配器 //向Weex 注册图片适配器 WXSDKEngine.initialize

Picasso,Glide,Fresco对比分析

匿名 (未验证) 提交于 2019-12-03 00:26:01
前言 图片加载是Android开发中最最基础的功能,同时图片加载OOM也一直困扰着很多开发者,因此为了降低开发周期和难度,我们经常会选用一些图片加载的开源库。 老牌的有ImageLoader,UIL,Volley,主流的有,Picasso,Glide,Fresco等等,选择一款好的图片加载裤就成了我们的首要问题。 接下来我们对比一下主流的三款 Picasso,Glide,Fresco框架的优缺点。 Picasso,Glide,Fresco的前世今生 基本项对比 对比项 Picasso Glide Fresco 地址 https://github.com/square/picasso https://github.com/bumptech/glide https://github.com/facebook/fresco 发布时间 2013年5月 2014年9月 2015年5月 是否支持gif false true true 是否支持webP true true true 视频缩略图 false true true 大小 100k 500 KB 2~3M 加载速度 中 高 高 Disk+Men Cache true true true Easy of use low mediun difficult star 13160 14709 12444 开发者 Square主导

uploading image not displaying however others is displaying

霸气de小男生 提交于 2019-12-02 22:42:57
问题 I am facing something weird , I can see the image that I am uploading in the link however it is not showing in the app. but If I enter another image link its displaying in the app. what is the cause ? anyone can help ? the main_actvity //Downloading data asynchronously public class AsyncHttpTask extends AsyncTask<String, Void, Integer> { @Override protected Integer doInBackground(String... params) { Integer result = 0; try { // Create Apache HttpClient HttpClient httpclient = new