Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
/**
 * @copyright Urucas
 * @license   Copyright (C) 2013. All rights reserved
 * @version   Release: 1.0.0
 * @link       http://urucas.com
 * @developers Bruno Alassia, Pamela Prosperi
 */

import android.content.Context;

import android.widget.Toast;

public class Main {
    public static void Toast(Context context, String text) {
        Toast toast = Toast.makeText(context, text, Toast.LENGTH_LONG);
        toast.show();
    }

    public static void Toast(Context context, int resourceID) {
        Toast toast = Toast.makeText(context, resourceID, Toast.LENGTH_LONG);
        toast.show();
    }

    public static void Toast(Context context, String text, int length) {
        Toast toast = Toast.makeText(context, text, length);
        toast.show();
    }

    public static void Toast(Context context, int resourceID, int length) {
        Toast toast = Toast.makeText(context, resourceID, length);
        toast.show();
    }
}