Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.app.Activity;

import android.view.Gravity;

import android.widget.Toast;

public class Main {
    public static void toast(Activity activity, String txt) {
        Toast toast = Toast.makeText(activity, txt, Toast.LENGTH_SHORT);
        int xoffset = 30, yoffset = 30;
        toast.setGravity(Gravity.RIGHT, xoffset, yoffset);
        toast.show();
    }
}