强烈提及毕加索目标是行不通的

时间:2017-03-22 10:53:52

标签: android android-fragments bitmap picasso

我正在使用Picassoicon添加actionbar。我已经读过,为了在每次需要Target strong reference final时加载图片而我已经使用了onPrepareLoad。但是,它再次进入onBitmapLoaded并且永远不会达到private void setLogoToActionBar() { final Target target = new Target() { @Override public void onBitmapLoaded(Bitmap bitmap, Picasso.LoadedFrom from) { Log.d("DEBUG", "onBitmapLoaded"); Drawable d = new BitmapDrawable(getResources(), bitmap); actionBar.setIcon(d); } @Override public void onBitmapFailed(Drawable errorDrawable) { Log.d("DEBUG", "onBitmapFailed"); } @Override public void onPrepareLoad(Drawable placeHolderDrawable) { Log.d("DEBUG", "onPrepareLoad"); actionBar.setIcon(placeHolderDrawable); } }; Picasso.with(getContext()).load(mShop.getClientLogo()).placeholder(R.drawable.shop_asset).resize(100, 100).into(target); } 。 我做错了什么?

  $(document).ready(function () {
    // Hide the model or a div; whatever you are using
    $(".modal").hide();
    //listen for the submit button click
    $("#myForm").submit(function (event) {
        $(".modal").show();
        // set a timeout to hide the gif
        setTimeout(function () { $('.modal').hide(); }, 2500);
      });
    });

0 个答案:

没有答案