Source:
<code>protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_add_hb1ac); Toolbar toolbar = (Toolbar) findViewById(R.id.activity_main_toolbar); if (toolbar != null) { setSupportActionBar(toolbar); getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setElevation(2); } this.retrieveExtra(); AddA1CPresenter presenter = new AddA1CPresenter(this); setPresenter(presenter); presenter.setReadingTimeNow(); readingTextView = (TextView) findViewById(R.id.hb1ac_add_value); unitTextView = (TextView) findViewById(R.id.hb1ac_unit); this.createDateTimeViewAndListener(); this.createFANViewAndListener(); if (!"percentage".equals(presenter.getA1CUnitMeasuerement())) { unitTextView.setText(getString(R.string.mmol_mol)); } FormatDateTime formatDateTime = new FormatDateTime(getApplicationContext()); if (this.isEditing()) { setTitle(R.string.title_activity_add_hb1ac_edit); HB1ACReading readingToEdit = presenter.getHB1ACReadingById(getEditId()); <START> readingTextView.setText(new StringBuilder().append(this.numberFormat.format(readingToEdit.getReading())).append("").toString()); <END> Calendar cal = Calendar.getInstance(); cal.setTime(readingToEdit.getCreated()); this.getAddDateTextView().setText(formatDateTime.getDate(cal)); this.getAddTimeTextView().setText(formatDateTime.getTime(cal)); presenter.updateReadingSplitDateTime(readingToEdit.getCreated()); } else { this.getAddDateTextView().setText(formatDateTime.getCurrentDate()); this.getAddTimeTextView().setText(formatDateTime.getCurrentTime()); } }</code><technical_language>This pattern is required. need concatenate empty string. concatenate need StringBuilder also. simplification is numberFormat.format(readingToEdit.getReading()) original code is a + "" force call toString() method print itself</technical_language>

Target:
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_add_hb1ac); Toolbar toolbar = findViewById(R.id.activity_main_toolbar); if (toolbar != null) { setSupportActionBar(toolbar); getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setElevation(2); } this.retrieveExtra(); AddA1CPresenter presenter = new AddA1CPresenter(this); setPresenter(presenter); presenter.setReadingTimeNow(); readingTextView = findViewById(R.id.hb1ac_add_value); unitTextView = findViewById(R.id.hb1ac_unit); this.createDateTimeViewAndListener(); this.createFANViewAndListener(); if (!"percentage".equals(presenter.getA1CUnitMeasuerement())) { unitTextView.setText(getString(R.string.mmol_mol)); } FormatDateTime formatDateTime = new FormatDateTime(getApplicationContext()); if (this.isEditing()) { setTitle(R.string.title_activity_add_hb1ac_edit); HB1ACReading readingToEdit = presenter.getHB1ACReadingById(getEditId()); readingTextView.setText(this.numberFormat.format(readingToEdit.getReading())); Calendar cal = Calendar.getInstance(); cal.setTime(readingToEdit.getCreated()); this.getAddDateTextView().setText(formatDateTime.getDate(cal)); this.getAddTimeTextView().setText(formatDateTime.getTime(cal)); presenter.updateReadingSplitDateTime(readingToEdit.getCreated()); } else { this.getAddDateTextView().setText(formatDateTime.getCurrentDate()); this.getAddTimeTextView().setText(formatDateTime.getCurrentTime()); } }