How to make Countdown Timer with Start, Pause and Reset in Android

Full source code to build a simple countdown timer, which shows the remaining time in minutes and seconds. It will have a start/pause button and a reset button which is only visible, if the timer is not running. For this, we will use the CountDownTimer interface and override the onTick and onFinish methods. We will … Read more

How to make Floating Context Menu in Android

Full source of Android to create a floating context menu, which will appear when we long click on a particular view or item. For this we will create a menu xml file, override onCreateContextMenu to inflate this menu, use the registerForContextMenu method to set it on a TextView and finally handle clicks by overriding onContextItemSelected … Read more

iconSwitch Library in Android

Full source code by using an awesome library called iconSwitch with which we can create custom toggle switches that show icons on the left and right side. We can change it’s attributes like color, size, icons and we will implement an onCheckedChangeListener to react to toggles on that switchv Gradle activity_main.xml MainActivity.java