[Solved] Display a toast after clicking an item in a RecyclerView

According to this question this is the best way to implement clicking on the item of RecyclerView Firstly create a file values/ids.xml and put this in it: <?xml version=”1.0″ encoding=”utf-8″?> <resources> <item name=”item_click_support” type=”id” /> </resources> then add the code below to your source for Java Copy the following helper class to your project public … Read more

[Solved] Toast Error message, but The Application is still running the code [closed]

Maybe you need like this: public void doSomeWork() { String usiaTahun = tahunUsia.getText().toString(); // check value is empty if (!usiaTahun.isEmpty()) { // parse string to integer int tahunAngka = Integer.parseInt(usiaTahun); // check value is in between 0 to 5 if (tahunAngka < 0 || tahunAngka > 5) { // error message Toast.makeText(MainActivity.this, “Tahun Yang Anda … Read more