Skip to content

Commit

Permalink
Update CafeBar follows latest release
Browse files Browse the repository at this point in the history
  • Loading branch information
danimahardhika authored Sep 9, 2017
1 parent 6f9154d commit ced3e51
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ public void onClick(View view) {
setFavorite(favorite, name.getCurrentTextColor(), position, true);

CafeBar.builder(mContext)
.theme(new CafeBarTheme.Custom(ColorHelper.getAttributeColor(
.theme(CafeBarTheme.Custom(ColorHelper.getAttributeColor(
mContext, R.attr.card_background)))
.fitSystemWindow()
.floating(true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ class CategoryViewHolder extends RecyclerView.ViewHolder {

private void showCafeBar(String title, String content, boolean showCopy) {
CafeBar.Builder builder = CafeBar.builder(mContext)
.theme(new CafeBarTheme.Custom(ColorHelper.getAttributeColor(
.theme(CafeBarTheme.Custom(ColorHelper.getAttributeColor(
mContext, R.attr.card_background)))
.typeface(TypefaceHelper.getRegular(mContext), TypefaceHelper.getBold(mContext))
.content(title)
Expand All @@ -264,7 +264,6 @@ private void showCafeBar(String title, String content, boolean showCopy) {

if (showCopy) {
builder.neutralText(R.string.copy)
.neutralColor(ColorHelper.getAttributeColor(mContext, R.attr.colorAccent))
.onNeutral(cafeBar -> {
ClipboardManager clipboard = (ClipboardManager) mContext.getSystemService(Context.CLIPBOARD_SERVICE);
ClipData clip = ClipData.newPlainText("content", content);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ public void onClick(View view) {
setFavorite(favorite, name.getCurrentTextColor(), position, true);

CafeBar.builder(mContext)
.theme(new CafeBarTheme.Custom(ColorHelper.getAttributeColor(
.theme(CafeBarTheme.Custom(ColorHelper.getAttributeColor(
mContext, R.attr.card_background)))
.fitSystemWindow()
.floating(true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ protected void onPostExecute(Boolean aBoolean) {

if (aBoolean) {
CafeBar.builder(mContext)
.theme(new CafeBarTheme.Custom(ColorHelper.getAttributeColor(
.theme(CafeBarTheme.Custom(ColorHelper.getAttributeColor(
mContext, R.attr.card_background)))
.contentTypeface(TypefaceHelper.getRegular(mContext))
.floating(true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ protected void onPostExecute(Boolean aBoolean) {
res = R.string.wallpapers_loader_failed;
}
CafeBar.builder(mContext)
.theme(new CafeBarTheme.Custom(ColorHelper.getAttributeColor(
.theme(CafeBarTheme.Custom(ColorHelper.getAttributeColor(
mContext, R.attr.card_background)))
.contentTypeface(TypefaceHelper.getRegular(mContext))
.content(res)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,13 @@ public void start() {

if (WallpaperHelper.isWallpaperSaved(mContext, mWallpaper)) {
CafeBar.builder(mContext)
.theme(new CafeBarTheme.Custom(ColorHelper.getAttributeColor(mContext, R.attr.card_background)))
.theme(CafeBarTheme.Custom(ColorHelper.getAttributeColor(mContext, R.attr.card_background)))
.floating(true)
.fitSystemWindow()
.duration(CafeBarDuration.MEDIUM.getDuration())
.typeface(TypefaceHelper.getRegular(mContext), TypefaceHelper.getBold(mContext))
.content(R.string.wallpaper_already_downloaded)
.neutralText(R.string.open)
.neutralColor(ColorHelper.getAttributeColor(mContext, R.attr.colorAccent))
.onNeutral(cafeBar -> {
Uri uri = FileHelper.getUriFromFile(mContext, mContext.getPackageName(), target);
if (uri == null) {
Expand Down Expand Up @@ -119,7 +118,7 @@ public void start() {

private void showCafeBar(int res) {
CafeBar.builder(mContext)
.theme(new CafeBarTheme.Custom(ColorHelper.getAttributeColor(mContext, R.attr.card_background)))
.theme(CafeBarTheme.Custom(ColorHelper.getAttributeColor(mContext, R.attr.card_background)))
.contentTypeface(TypefaceHelper.getRegular(mContext))
.content(res)
.floating(true)
Expand Down

0 comments on commit ced3e51

Please sign in to comment.