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;
}
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();
}
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();
}
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;
}
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;
}
Aggregations