Search in sources :

Example 26 with Toast

use of android.widget.Toast in project AdMoney by ErnestoGonAr.

the class ConfirmarActivity method error.

public void error(View v) {
    Toast toast = Toast.makeText(this, "Tu NIP no coincide", Toast.LENGTH_SHORT);
    toast.setGravity(Gravity.CENTER_VERTICAL, 0, 0);
    toast.show();
    return;
}
Also used : Toast(android.widget.Toast)

Example 27 with Toast

use of android.widget.Toast in project AdMoney by ErnestoGonAr.

the class Detalle_Categorias method msjiconoquitado.

private void msjiconoquitado() {
    Toast toast = Toast.makeText(this, "Eliminaste el icono", Toast.LENGTH_SHORT);
    toast.setGravity(Gravity.CENTER_VERTICAL, 0, 0);
    toast.show();
}
Also used : Toast(android.widget.Toast)

Example 28 with Toast

use of android.widget.Toast in project AdMoney by ErnestoGonAr.

the class Detalle_Categorias method msjprestamos.

private void msjprestamos() {
    Toast toast = Toast.makeText(this, "No puedes eliminar Prestamos ", Toast.LENGTH_SHORT);
    toast.setGravity(Gravity.CENTER_VERTICAL, 0, 0);
    toast.show();
}
Also used : Toast(android.widget.Toast)

Example 29 with Toast

use of android.widget.Toast in project AdMoney by ErnestoGonAr.

the class NuevoEgresoActivity method validar.

private boolean validar() {
    if (cantidad.equals("")) {
        cantidad = "0";
    }
    float aux = bd.sumaIngresos() - bd.sumaGastos();
    if (aux < Float.parseFloat(cantidad)) {
        Toast toast = Toast.makeText(this, "No tienes fondos suficientes para realizar este gasto", Toast.LENGTH_LONG);
        toast.setGravity(Gravity.CENTER_VERTICAL, 0, 0);
        toast.show();
        caja.setText("0");
        caja.requestFocus();
        return false;
    }
    if (Float.parseFloat(cantidad) > 999999) {
        Toast toast = Toast.makeText(this, "Cantidad muy grande", Toast.LENGTH_SHORT);
        toast.setGravity(Gravity.CENTER_VERTICAL, 0, 0);
        toast.show();
        caja.requestFocus();
        return false;
    }
    if (caja.getText().toString().equals("")) {
        Toast toast = Toast.makeText(this, "Ingresa la cantidad", Toast.LENGTH_SHORT);
        toast.setGravity(Gravity.CENTER_VERTICAL, 0, 0);
        toast.show();
        return false;
    }
    if (caja.getText().toString().equals("$0.00")) {
        Toast toast = Toast.makeText(this, "Ingresa una cantidad positiva", Toast.LENGTH_SHORT);
        toast.setGravity(Gravity.CENTER_VERTICAL, 0, 0);
        toast.show();
        return false;
    }
    if (categr.getSelectedItemPosition() == 0) {
        Toast toast = Toast.makeText(this, "Elige una categoria", Toast.LENGTH_SHORT);
        toast.setGravity(Gravity.CENTER_VERTICAL, 0, 0);
        toast.show();
        return false;
    }
    return true;
}
Also used : Toast(android.widget.Toast)

Example 30 with Toast

use of android.widget.Toast in project AdMoney by ErnestoGonAr.

the class NuevoIngresoActivity method validar.

private boolean validar() {
    if (cantidad.equals("")) {
        cantidad = "0";
        caja.requestFocus();
    }
    if (Float.parseFloat(cantidad) > 999999) {
        Toast toast = Toast.makeText(this, "Cantidad muy grande", Toast.LENGTH_SHORT);
        toast.setGravity(Gravity.CENTER_VERTICAL, 0, 0);
        toast.show();
        cantidad = "0";
        caja.requestFocus();
        return false;
    }
    if (caja.getText().toString().equals("")) {
        Toast toast = Toast.makeText(this, "Ingresa la cantidad", Toast.LENGTH_SHORT);
        toast.setGravity(Gravity.CENTER_VERTICAL, 0, 0);
        toast.show();
        return false;
    }
    if (caja.getText().toString().equals("$0.00")) {
        Toast toast = Toast.makeText(this, "Ingresa una cantidad positiva", Toast.LENGTH_SHORT);
        toast.setGravity(Gravity.CENTER_VERTICAL, 0, 0);
        toast.show();
        return false;
    }
    if (catIng.getSelectedItemPosition() == 0) {
        Toast toast = Toast.makeText(this, "Elige una categoria", Toast.LENGTH_SHORT);
        toast.setGravity(Gravity.CENTER_VERTICAL, 0, 0);
        toast.show();
        return false;
    }
    return true;
}
Also used : Toast(android.widget.Toast)

Aggregations

Toast (android.widget.Toast)485 Context (android.content.Context)89 View (android.view.View)86 TextView (android.widget.TextView)74 Intent (android.content.Intent)55 Rect (android.graphics.Rect)34 LayoutInflater (android.view.LayoutInflater)31 SuppressLint (android.annotation.SuppressLint)30 JSONObject (org.json.JSONObject)23 ImageView (android.widget.ImageView)21 RequestQueue (com.android.volley.RequestQueue)20 Response (com.android.volley.Response)20 EditText (android.widget.EditText)19 JSONException (org.json.JSONException)18 VolleyError (com.android.volley.VolleyError)17 JsonObjectRequest (com.android.volley.toolbox.JsonObjectRequest)17 User (model.User)16 PendingIntent (android.app.PendingIntent)15 File (java.io.File)15 HashMap (java.util.HashMap)15