RFID Transports/app/src/main/java/es/uca/tfg_ismaelsantos/notificaciones_rfid/FragmentAlertasUsuario.java
/**
     * Muestra detalles de alerta
     * @param alerta
     */
Muestra detalles de alerta
@param alerta
Muestra detalles de alerta @param alerta
private void muestraAlertaDetalles(Alerta alerta){
        Log.d("TFG_F_A_U","Muestra detalles de alerta id:"+alerta.getId());
        LayoutInflater inflater = getActivity().getLayoutInflater();
        View dialogLayout = inflater.inflate(R.layout.activity_alerta_usuario, null);
        DecimalFormat decimales = new DecimalFormat("0.00");
        TextView id,uid,saldoDB,saldoCard,fecha;
        id = (TextView)dialogLayout.findViewById(R.id.id);
        id.setText( " "+alerta.getId());
        uid = (TextView)dialogLayout.findViewById(R.id.uid);
        uid.setText(" "+alerta.getUID());
        saldoDB = (TextView)dialogLayout.findViewById(R.id.saldoDB);
        saldoDB.setText(" "+decimales.format(alerta.getSaldo_bd()/200.0)+"€");
        saldoCard = (TextView)dialogLayout.findViewById(R.id.saldoCard);
        saldoCard.setText(" "+decimales.format(alerta.getSaldo_tarjeta()/200.0)+"€");
        fecha = (TextView)dialogLayout.findViewById(R.id.fecha);
        fecha.setText(" " + alerta.getsFecha_creacion());
        AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
        builder.setView(dialogLayout);
        alert = builder.create();
        alert.show();
    }
private void muestraAlertaDetalles ( Alerta alerta ) { Log . d ( "TFG_F_A_U" , "Muestra detalles de alerta id:" + alerta . getId ( ) ) ; LayoutInflater inflater = getActivity ( ) . getLayoutInflater ( ) ; View dialogLayout = inflater . inflate ( R . layout . activity_alerta_usuario , null ) ; DecimalFormat decimales = new DecimalFormat ( "0.00" ) ; TextView id , uid , saldoDB , saldoCard , fecha ; id = ( TextView ) dialogLayout . findViewById ( R . id . id ) ; id . setText ( " " + alerta . getId ( ) ) ; uid = ( TextView ) dialogLayout . findViewById ( R . id . uid ) ; uid . setText ( " " + alerta . getUID ( ) ) ; saldoDB = ( TextView ) dialogLayout . findViewById ( R . id . saldoDB ) ; saldoDB . setText ( " " + decimales . format ( alerta . getSaldo_bd ( ) / 200.0 ) + "€"); saldoCard = ( TextView ) dialogLayout . findViewById ( R . id . saldoCard ) ; saldoCard . setText ( " " + decimales . format ( alerta . getSaldo_tarjeta ( ) / 200.0 ) + "€"); fecha = ( TextView ) dialogLayout . findViewById ( R . id . fecha ) ; fecha . setText ( " " + alerta . getsFecha_creacion ( ) ) ; AlertDialog . Builder builder = new AlertDialog . Builder ( getActivity ( ) ) ; builder . setView ( dialogLayout ) ; alert = builder . create ( ) ; alert . show ( ) ; }
Muestra detalles de alerta
 @param alerta
Muestra detalles de alerta @param alerta