You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
23 lines
488 B
Java
23 lines
488 B
Java
|
|
package android.widget;
|
||
|
|
|
||
|
|
import android.content.Context;
|
||
|
|
|
||
|
|
public class Toast {
|
||
|
|
|
||
|
|
private String text;
|
||
|
|
|
||
|
|
public static Toast makeText(Context context, int resId, int duration) {
|
||
|
|
return makeText(context, context.getString(resId), duration);
|
||
|
|
}
|
||
|
|
|
||
|
|
public static Toast makeText(Context context, CharSequence text, int duration) {
|
||
|
|
Toast toast = new Toast();
|
||
|
|
toast.text = String.valueOf(text);
|
||
|
|
return toast;
|
||
|
|
}
|
||
|
|
|
||
|
|
public void show() {
|
||
|
|
System.out.println("showing toast: " + text);
|
||
|
|
}
|
||
|
|
}
|