Skip to content

Commit

Permalink
some changes
Browse files Browse the repository at this point in the history
  • Loading branch information
faramarzaf committed Oct 15, 2020
1 parent 4de12dd commit cdca8f0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 277 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import com.google.android.material.snackbar.Snackbar

class SimpleSnackbar {


companion object {

private lateinit var snackbar: Snackbar
Expand All @@ -24,6 +23,7 @@ class SimpleSnackbar {
*Simple snackbar without action just include text
*/

@JvmStatic
fun show(view: View, text: String, backgroundColor: Int, textColor: Int, isShortTime: Boolean) {

if (isShortTime)
Expand All @@ -42,6 +42,7 @@ class SimpleSnackbar {
/**
*Simple snackbar with font preferences
*/
@JvmStatic
fun show(context: Context, view: View, text: String, asset: String, backgroundColor: Int, textColor: Int, isShortTime: Boolean) {

if (isShortTime)
Expand All @@ -62,7 +63,7 @@ class SimpleSnackbar {
/**
*Snackbar with action and callBack
*/

@JvmStatic
fun show(view: View, text: String, textAction: String, backgroundColor: Int, textColor: Int, textActionColor: Int, isShortTime: Boolean, callback: CallbackSnackBar) {

if (isShortTime)
Expand All @@ -87,7 +88,7 @@ class SimpleSnackbar {
/**
*Snackbar with font preferences
*/

@JvmStatic
fun show(context: Context, view: View, text: String, textAction: String, backgroundColor: Int, textColor: Int, textActionColor: Int, asset: String, isShortTime: Boolean, callback: CallbackSnackBar) {

if (isShortTime)
Expand Down Expand Up @@ -120,6 +121,4 @@ class SimpleSnackbar {
}
}
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ import com.faramarzaf.sdk.af_android_sdk.core.interfaces.DialogCallback

class PublicDialog {


companion object {


@JvmStatic
fun yesNoDialog(context: Context, title: String, message: String, textYes: String, textNo: String, icon: Int, callback: DialogCallback) {
AlertDialog.Builder(context)
.setTitle(title)
Expand All @@ -23,8 +22,5 @@ class PublicDialog {
.setIcon(icon)
.show()
}

}


}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import com.faramarzaf.sdk.af_android_sdk.core.interfaces.CallbackPopUpMenu
class SimpleMenuInflater {

companion object {
fun showPopUpMenu(
context: Context, title: List<String>, view: View, callback: CallbackPopUpMenu
) {

@JvmStatic
fun showPopUpMenu(context: Context, title: List<String>, view: View, callback: CallbackPopUpMenu) {
val menu = PopupMenu(context, view)
for (i in title) {
menu.menu.add(i)
Expand All @@ -29,9 +29,8 @@ class SimpleMenuInflater {
menu.show()
}

fun iconPopUpMenu(
context: Context, view: View, layoutMenu: Int, callback: CallbackPopUpMenu
) {
@JvmStatic
fun iconPopUpMenu(context: Context, view: View, layoutMenu: Int, callback: CallbackPopUpMenu) {
val menu = PopupMenu(context, view)
menu.inflate(layoutMenu)
menu.setOnMenuItemClickListener {
Expand Down

0 comments on commit cdca8f0

Please sign in to comment.