Android Toast Create showFailure(Activity activity, int id)

Here you can find the source of showFailure(Activity activity, int id)

Description

show Failure

License

Apache License

Declaration

public static void showFailure(Activity activity, int id) 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Copyright 2012-2013 Trento RISE/* w w  w . j a va2s .  c o  m*/
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *        http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either   express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 ******************************************************************************/

import android.app.Activity;

import android.widget.Toast;

public class Main {
    public static void showFailure(Activity activity, int id) {
        Toast.makeText(activity, activity.getResources().getString(id),
                Toast.LENGTH_LONG).show();
    }
}

Related

  1. toast(Context c, String msg)
  2. showToastShort(Activity ctx, String text)
  3. showToastLong(Activity ctx, String text)
  4. showMessage(Context ctx, String msg)
  5. showMessage(final Activity context, final String message)
  6. showElapsed(long start, long end, Context ctx)
  7. formatToastDist(String message, int value, String unit)
  8. formatToastTemp(String message, int value, String unit)
  9. showMessage(final Activity activity, final String message)