There are two TextView, I want to check the equality of data in these textbox. I wrote one IF function, but the code is running incorrectly. Date time data, date and Time written in the test data I want to check the equality between textler.
TextView textView1 = (TextView) findViewById(R.id.current_time_view);
String tarihsaatdata = textView1.getText().toString();
String tarihvesaatText = (tarihTextView.getText().toString()) + " " + (saatTextView.getText().toString());
if (tarihsaatdata == tarihvesaatText){
if(aSwitch.isChecked()){
Map<String, Object> newStatus = new HashMap<>();
newStatus.put("001", true);
ref.setValue(newStatus);
}else{
Map<String, Object> newStatus = new HashMap<>();
newStatus.put("001", false);
ref.setValue(newStatus);
} }else{
}
}
});