@Override
 protected void onResume() {
   super.onResume();
   if (Config.get().donationEnabled() && BillingProcessor.isIabServiceAvailable(this)) {
     bp = new BillingProcessor(this, Config.get().donationLicenseKey(), this);
   }
 }
  @Override
  public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);
    ButterKnife.bind(this, view);

    applyInsets((ViewGroup) view);

    mAdapter =
        new WallpaperAdapter(
            new WallpaperAdapter.ClickListener() {
              @Override
              public boolean onClick(View view, int index, boolean longPress) {
                if (longPress) {
                  showOptions(index);
                  return true;
                } else {
                  openViewer(view, index);
                  return false;
                }
              }
            });
    mRecyclerView.setLayoutManager(
        new StaggeredGridLayoutManager(
            Config.get().gridWidthWallpaper(), StaggeredGridLayoutManager.VERTICAL));
    mRecyclerView.setAdapter(mAdapter);

    if (savedInstanceState != null)
      mWallpapers =
          (WallpaperUtils.WallpapersHolder) savedInstanceState.getSerializable("wallpapers");
    if (getActivity() != null) load();
  }