Java Code Examples for com.danimahardhika.android.helpers.core.utils.LogUtil#d()
The following examples show how to use
com.danimahardhika.android.helpers.core.utils.LogUtil#d() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CandyBarService.java From candybar with Apache License 2.0 | 5 votes |
@Override public void onTaskRemoved(Intent rootIntent) { LogUtil.d("App removed from recent task, database connection closed"); Database.get(this).closeDatabase(); stopSelf(); }
Example 2
Source File: RequestAdapter.java From candybar with Apache License 2.0 | 5 votes |
@Nullable private StaggeredGridLayoutManager.LayoutParams getLayoutParams(@Nullable View view) { if (view != null) { try { return (StaggeredGridLayoutManager.LayoutParams) view.getLayoutParams(); } catch (Exception e) { LogUtil.d(Log.getStackTraceString(e)); } } return null; }
Example 3
Source File: LocalFavoritesBackupTask.java From wallpaperboard with Apache License 2.0 | 5 votes |
@Override protected void onPostExecute(Boolean aBoolean) { super.onPostExecute(aBoolean); if (aBoolean) { LogUtil.d("Local backup created"); } }
Example 4
Source File: WallpaperBoardService.java From wallpaperboard with Apache License 2.0 | 5 votes |
@Override public void onTaskRemoved(Intent rootIntent) { LogUtil.d("App removed from recent task, database connection closed"); Database.get(this).closeDatabase(); stopSelf(); }
Example 5
Source File: CandyBarService.java From candybar-library with Apache License 2.0 | 5 votes |
@Override public void onTaskRemoved(Intent rootIntent) { LogUtil.d("App removed from recent task, database connection closed"); Database.get(this).closeDatabase(); stopSelf(); }
Example 6
Source File: RequestAdapter.java From candybar-library with Apache License 2.0 | 5 votes |
@Nullable private StaggeredGridLayoutManager.LayoutParams getLayoutParams(@Nullable View view) { if (view != null) { try { return (StaggeredGridLayoutManager.LayoutParams) view.getLayoutParams(); } catch (Exception e) { LogUtil.d(Log.getStackTraceString(e)); } } return null; }
Example 7
Source File: CandyBarArtWorker.java From candybar with Apache License 2.0 | 4 votes |
@Override @NonNull public Result doWork() { LogUtil.d("Executing doWork() for Muzei"); if (!URLUtil.isValidUrl(mContext.getString(R.string.wallpaper_json))) { LogUtil.e("Not a valid Wallpaper JSON URL"); return Result.failure(); } List<Wallpaper> wallpapers = Database.get(mContext).getWallpapers(); ProviderClient providerClient = ProviderContract.getProviderClient(getApplicationContext(), WORKER_TAG); if (Preferences.get(getApplicationContext()).isConnectedAsPreferred()) { ArrayList artworks = new ArrayList<Artwork>(); for (Wallpaper wallpaper : wallpapers) { if (wallpaper != null) { Uri uri = Uri.parse(wallpaper.getURL()); Artwork artwork = new Artwork.Builder() .title(wallpaper.getName()) .byline(wallpaper.getAuthor()) .persistentUri(uri) .build(); if (!artworks.contains(artwork)) { artworks.add(artwork); } else { LogUtil.d("Already Contains Artwork" + wallpaper.getName()); } } else { LogUtil.d("Wallpaper is Null"); } } LogUtil.d("Closing Database - Muzei"); Database.get(mContext).closeDatabase(); providerClient.setArtwork(artworks); return Result.success(); } return Result.failure(); }
Example 8
Source File: HomeAdapter.java From candybar-library with Apache License 2.0 | 4 votes |
@Override public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { try { if (holder.itemView != null) { StaggeredGridLayoutManager.LayoutParams layoutParams = (StaggeredGridLayoutManager.LayoutParams) holder.itemView.getLayoutParams(); layoutParams.setFullSpan(isFullSpan(holder.getItemViewType())); } } catch (Exception e) { LogUtil.d(Log.getStackTraceString(e)); } if (holder.getItemViewType() == TYPE_HEADER) { HeaderViewHolder headerViewHolder = (HeaderViewHolder) holder; headerViewHolder.title.setText(mContext.getResources().getString(R.string.home_title)); headerViewHolder.content.setHtml(mContext.getResources().getString(R.string.home_description)); String uri = mContext.getResources().getString(R.string.home_image); if (URLUtil.isValidUrl(uri)) { ImageLoader.getInstance().displayImage(uri, headerViewHolder.image, ImageConfig.getDefaultImageOptions(true)); } else if (ColorHelper.isValidColor(uri)) { headerViewHolder.image.setBackgroundColor(Color.parseColor(uri)); } else { uri = "drawable://" + DrawableHelper.getResourceId(mContext, uri); ImageLoader.getInstance().displayImage(uri, headerViewHolder.image, ImageConfig.getDefaultImageOptions(true)); } } else if (holder.getItemViewType() == TYPE_CONTENT) { ContentViewHolder contentViewHolder = (ContentViewHolder) holder; int finalPosition = position - 1; int color = ColorHelper.getAttributeColor(mContext, android.R.attr.textColorPrimary); if (mHomes.get(finalPosition).getIcon() != -1) { if (mHomes.get(finalPosition).getType() == Home.Type.DIMENSION) { contentViewHolder.autoFitTitle.setCompoundDrawablesWithIntrinsicBounds( DrawableHelper.getResizedDrawable(mContext, DrawableHelper.get(mContext, mHomes.get(finalPosition).getIcon()), 40), null, null, null); } else { contentViewHolder.autoFitTitle.setCompoundDrawablesWithIntrinsicBounds(DrawableHelper.getTintedDrawable( mContext, mHomes.get(finalPosition).getIcon(), color), null, null, null); } } if (mHomes.get(finalPosition).getType() == Home.Type.ICONS) { contentViewHolder.autoFitTitle.setSingleLine(true); contentViewHolder.autoFitTitle.setMaxLines(1); contentViewHolder.autoFitTitle.setTextSize(TypedValue.COMPLEX_UNIT_PX, mContext.getResources().getDimension(R.dimen.text_max_size)); contentViewHolder.autoFitTitle.setGravity(Gravity.END | Gravity.CENTER_VERTICAL); contentViewHolder.autoFitTitle.setIncludeFontPadding(false); contentViewHolder.autoFitTitle.setSizeToFit(true); contentViewHolder.subtitle.setGravity(Gravity.END | Gravity.CENTER_VERTICAL); } else { contentViewHolder.autoFitTitle.setTextSize(TypedValue.COMPLEX_UNIT_PX, mContext.getResources() .getDimension(R.dimen.text_content_title)); } contentViewHolder.autoFitTitle.setText(mHomes.get(finalPosition).getTitle()); if (mHomes.get(finalPosition).getSubtitle().length() > 0) { contentViewHolder.subtitle.setText(mHomes.get(finalPosition).getSubtitle()); contentViewHolder.subtitle.setVisibility(View.VISIBLE); } } else if (holder.getItemViewType() == TYPE_ICON_REQUEST) { IconRequestViewHolder iconRequestViewHolder = (IconRequestViewHolder) holder; int installed = CandyBarMainActivity.sInstalledAppsCount; int missed = CandyBarMainActivity.sMissedApps == null ? installed : CandyBarMainActivity.sMissedApps.size(); int themed = installed - missed; iconRequestViewHolder.installedApps.setText(String.format( mContext.getResources().getString(R.string.home_icon_request_installed_apps), installed)); iconRequestViewHolder.missedApps.setText(String.format( mContext.getResources().getString(R.string.home_icon_request_missed_apps), missed)); iconRequestViewHolder.themedApps.setText(String.format( mContext.getResources().getString(R.string.home_icon_request_themed_apps), themed)); iconRequestViewHolder.progress.setMax(installed); iconRequestViewHolder.progress.setProgress(themed); } else if (holder.getItemViewType() == TYPE_WALLPAPERS) { WallpapersViewHolder wallpapersViewHolder = (WallpapersViewHolder) holder; wallpapersViewHolder.title.setText( String.format(mContext.getResources().getString(R.string.home_loud_wallpapers), Preferences.get(mContext).getAvailableWallpapersCount())); } }