-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove ToastFactory, replace with SnackbarFactory
- Loading branch information
1 parent
72cbbac
commit d0df0fc
Showing
2 changed files
with
15 additions
and
15 deletions.
There are no files selected for viewing
19 changes: 15 additions & 4 deletions
19
app/src/main/java/com/hitherejoe/androidboilerplate/util/SnackbarFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,18 @@ | ||
package com.hitherejoe.androidboilerplate.util; | ||
|
||
/** | ||
* Created by hitherejoe on 13/08/15. | ||
*/ | ||
import android.content.Context; | ||
import android.support.design.widget.Snackbar; | ||
import android.view.View; | ||
import android.view.ViewGroup; | ||
|
||
import com.hitherejoe.androidboilerplate.R; | ||
|
||
public class SnackbarFactory { | ||
} | ||
|
||
public static Snackbar createSnackbar(Context context, View view, String message) { | ||
Snackbar snackbar = Snackbar.make(view, message, Snackbar.LENGTH_SHORT); | ||
ViewGroup group = (ViewGroup) snackbar.getView(); | ||
group.setBackgroundColor(context.getResources().getColor(R.color.primary)); | ||
return snackbar; | ||
} | ||
} |
11 changes: 0 additions & 11 deletions
11
app/src/main/java/com/hitherejoe/androidboilerplate/util/ToastFactory.java
This file was deleted.
Oops, something went wrong.