Toast MyToast

In this post we will be talking about the most helpful feature provided by Android for a quick notification to user, i.e. Toasts “Small informative texts shown at bottom-center of device screen, for defined time duration”.

Default UI design of these toasts is a semi-transparent dark color background with white text over it, not even showing the name of application which spawned it, no so eye-catching, right? I know… So, let’s make a custom Toast Notification that complements our awesome UI…

Continue reading

Optimized ListView Having Listener within The Row Items

ListView is an extensively used widget in Android Applications for displaying data in a structured way. To display custom made views as row elements, it is always preferred to associate Base Adapter with ListView. This is how a BaseAdapter can be used to show a list in which each element contains a text field and a checkbox:

MainActivity.java

// Initialize the ListView and set its adapter.
ListView listView = (ListView) findViewById(R.id.list_view);
listView.setAdapter(new NormalListAdapter((Context) this));

Continue reading