Setting button actions programatically in Java, Python, JavaScript, SWIFT and Kotlin

By | January 9, 2024

Button action calls for an action when user tap on a button. This may be for making a service call, for doing some calculation or simply just to dismiss a view. Here are the different ways of setting button action in different languages. Java Python (TKinter) JavaScript: Swift Kotlin These examples demonstrate how to set… Read More »

Flutter Tutorials – Handling Back Button in Flutter for Android and iOS

By | May 20, 2019

Handling back button and providing a different functionality is always a requirement among mobile developers. Flutter also helps you to do that. Let’s see how that works. Watch Video Tutorial This is achieved with the help of a widget called “WillPopScope”. ‘WillPopScope‘ has a method call ‘onWillPop‘ which can be used to override the back… Read More »

Create Custom Widget(Button) in Flutter – Android or iOS

By | January 3, 2019

Hello friends, In this article, I will show you how you can create custom widgets in Flutter using Widget Composition. As you know Flutter is cross Platform, so this is gonna work for both Android and iOS. Watch Video Tutorial   Let’s start now.   I am going to create a custom button just like… Read More »

Service Call in Flutter with Retry Button, Catch Network failures.

By | December 20, 2018

Hello Devs, In today’s tutorial we will find out how we can write a simple service call in flutter and show retry when network call fails. Below is a sample video of the app we are going to make… Watch Video Tutorial You can watch the complete video tutorial from here… Add Library To do… Read More »

Simple Alert with two buttons in iOS Swift with callback

By | December 1, 2017

Dear Friends, Today I will show you how to create a simple alert with two buttons and how to write a callback for each button. The code is simple. Its written for Swift 3. Send your comments to coderzheaven@gmail.com

Floating Button like Facebook Chat in Android

By | July 20, 2017

Floating widgets float over the screen over any app that is currently running. Here we will make a floating action button that you can drag around the screen to position and do actions on it. Add Permission For drawing over the other apps, you need “android.permission.SYSTEM_ALERT_WINDOW” permission. So add this entry in your manifest. Our… Read More »

SnackBar and Floating Button Demo in Android

By | February 22, 2016

Snackbar is a UI element used for user feedback, just like a Toast except they provide action to interact with. Snackbar will be displayed at the bottom of the screen and can be swiped off in order to dismiss them. Floating Button sits on the top of your layout and provides a way for a… Read More »

MapKit Demo Swift – Annotation, Custom Annotation, Custom Annotation with Button, Search, Showing Directions – Apple Maps iOS

By | February 14, 2016

Hi all, In this Demo I will show How to implement Apple ‘s MapKit on iOS. This demo will show following this. 1. Show Annotation in Maps. 2. Show Custom Annotation in Maps. 3. Show Custom Annotation with Custom Button in Maps. 4. Pin Point to location from Search. 5. Showing Route/Direction between two location… Read More »

How to create Gradient Buttons Dynamically without XML in Android?

By | March 10, 2013

Hello all.. I have shown you how to create gradient buttons in Android using XML in this post. Now I will show you how to create these gradient buttons dynamically. We will start with a class that extends StateListDrawable similar to state-list we use in XML UIGradientSelector.java Now the class that extends PaintDrawable Class. UIGradientDrawable.java… Read More »

How to extend a Dialog class and write it’s button click on your activity using Interfaces in Android?

By | February 13, 2013

Hello all……. This tutorial is all about writing your own Dialogs and implementing the click or touch on any of it’s views in another class (say another activity). This is primarily useful if we have a common dialog and have to handle it’s button click in different ways in different activities. Here what we will… Read More »

How to override hardware Home button in android? OR How to listen to home button click in android?

By | June 2, 2012

Hello everyone… In this post I will show you how to listen to hardware button in an android smartphone. This post especially shows how to listen to the home button in android. But my advice is never override the home button in your app. Home button is to move the currently running process to background.… Read More »

How to add checkboxes and radio buttons to ListView in android? OR How to set single choice items in a ListView in android?

By | May 25, 2012

To create a list of multiple-choice items (checkboxes) or single-choice items (radio buttons) inside the dialog, use the setMultiChoiceItems() and setSingleChoiceItems() methods, respectively. If you create one of these selectable lists in the onCreateDialog() callback method, Android manages the state of the list for you. As long as the Activity is active, the dialog remembers… Read More »

How to create a Custom Toggle Button in android?

By | May 20, 2012

Hello everyone… In today’s tutorial I will show you how to create a custom toggle button in android. Often in our applications we don’t need a default toggle button, so I will show you how to change that to make a toggle button according to your need. First I will create a fresh project named… Read More »

How to add click handler to a button dynamically in Windows Phone?

By | March 26, 2012

Hello everyone…. This post is a simple example showing how to add eventHandlers to a button dynamically in windows phone or windows mobile. We know programming for windows phone is done in C# or Visual Basic. Here I am going to explain in C#. I assume that you have dragged a button control in your… Read More »

Android removes the need of Menu button from devices with ActionBar.

By | January 28, 2012

Hello all.. The latest development in android is that google has removed the menu button from android, instead they provide something called the actionbar like in the Honeycomb devices. Google introduced the ActionBar class as the standard solution to make actions from the user options immediately visible and quick to invoke The ActionBar looks like… Read More »