У меня есть 2 TextView
Textview1 Значение "0", Textview2 Значение "0,05"
пробует эти коды
private TextView geting_id_one, geting_id_two;
{onCreate)
geting_id_one = (TextView) findViewById(R.id.Textview1);
geting_id_two= (TextView) findViewById(R.id.Textview2);
(button Click)
float one = geting_id_one.getText().toString();
float two = geting_id_two.getText().toString();
if (one>two){
Toast.makeText(MainActivity.this,"TextView1 Bigger than TextView2", Toast.LENGTH_SHORT).show();
}
if (one>two){
Toast.makeText(MainActivity.this,"TextView2 Bigger than TextView1", Toast.LENGTH_SHORT).show();
}
ошибка просмотра
E / Ошибка в потоке: java.lang.NumberFormatException: для входной строки: "0,05"