LAMW - Showmessage custom toast icon+color addition lazarus / 43-Android ---------------------------------------------------------------------- Mongkey · 2023-11-10 03:53 Code: Java  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i         import android.graphics.Color;        import android.widget.TextView;        import android.graphics.PorterDuff;         public void ShowMessage(String _msg, int _gravity, int _timeLength,RESOURCE_BACKGROUND, ICON_MESSAGE,TOAST_FONT_COLOR,TOAST_FONT_SIZE) {        Log.i("ShowMessage", _msg);         Toast toast = Toast.makeText(controls.activity, _msg, _timeLength);         int posGravity = Gravity.BOTTOM;         switch (_gravity) {            case 1:                posGravity = Gravity.CENTER;                break;            case 8:                posGravity = Gravity.TOP;              break;        }         if (toast != null) {            float[] hsv = new float[3];            Color.colorToHSV(Color.GRAY,hsv);            //CUSTOM BACKGROUND COLOR             hsv[2] = 0.9f;            int newColor = Color.HSVToColor(hsv);            toast.setGravity(Gravity.TOP|Gravity .START,toast.getXOffset(),toast.getYOffset());// Add This line and change the gravity Flags used as per your use            toast.getView ().setBackground(controls.activity.getResources().getDrawable(R.drawab le.RESOURCE_BACKGROUND));// Replace with your drawable            toast.getView().getBackground().setColorFilter(newColor, PorterDuff.Mode.SRC_ATOP);// Replace BLACK with your own color          ((TextView)toast.getView().findViewById(android.R.id.message)).setC ompoundDrawablesWithIntrinsicBounds(controls.activity.getResources().g etDrawable(R.drawable.ICON_MESSAGE),null,null,null);             ((Tex tView)toast.getView().findViewById(android.R.id.message)).setShadowLay er(0, 0, 0, Color.BLACK);            // Setting the Text Appearance          if (Build.VERSION.SDK_INT                    >= Build.VERSION_CODES.M) {                ((TextView)toast.getView().fin dViewById(android.R.id.message)).setTextAppearance(                      R.style.toastTextStyle);            }            ((TextView)toast. getView().findViewById(android.R.id.message)).setTextColor(TOAST_FONT_ COLOR);            ((TextView)toast.getView().findViewById(android.R.i d.message)).setTextSize(TOAST_FONT_SIZE);             toast.setGravity(posGravity, 0, 0);            toast.show();        }    }     ---------------------------------------------------------------------- jmpessoa · 2023-11-17 17:27 Hi, Mongkey! How can I use this stuff to update LAMW?  There are some ".pas" change?