Files
android_translation_layer/src/api-impl/android/widget/Toast.java
Mis012 2802aaa28d api-impl: add stubs / simple stuff for OsmAnd
without native libs present, launches and renders white square
in map view; with native libs present, segfaults in bundled skia
2024-04-13 15:22:38 +02:00

27 lines
545 B
Java

package android.widget;
import android.content.Context;
public class Toast {
public Toast(Context context) {
/* TODO */
}
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(context);
toast.text = String.valueOf(text);
return toast;
}
public void show() {
System.out.println("showing toast: " + text);
}
}