android - Code optimisation. (Architecture) -
i'm making quiz app. user has finish phrase shown on display , write name of car in edittext, after pushing on button, if answer right, edittext become green, if doesn't, become red. if answers right (green), intent move on next activity. the question is: how optimize code, don't how it's like? if decide add more options wouldn't readable. public class mainactivity extends appcompatactivity { edittext et_one_one, et_one_two, et_one_three; button buttoncheck; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); et_one_one = (edittext) findviewbyid(r.id.et_one_one); et_one_two = (edittext) findviewbyid(r.id.et_one_two); et_one_three = (edittext) findviewbyid(r.id.et_one_three); buttoncheck = (button) findviewbyid(r.id.buttoncheck); buttoncheck.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v...