Android
-
How to Use Tooltips in Jetpack Compose
When I wrote my last article about Jetpack Compose, I stated there that Jetpack Compose is missing some (in my opinion) basic components, and one of them is the tooltip. At the time, there was no built-in composable to display tooltips and there were several alternative solutions circling online. The problem with those solutions was that once Jetpack Compose released newer versions, those solutions might break. So it wasn’t ideal and the community was left hoping that sometime in the…
-
How to Migrate from Play Core Library
You may have recently received an email from Google Play Store stating the following: Update your Play Core Maven dependency to an Android 14 compatible version! Your current Play Core library is incompatible with targetSdkVersion 34 (Android 14), which introduces a backwards-incompatible change to broadcast receivers to improve user security. As a reminder, from August 31, Google Play requires all new app releases to target Android 14. Update to the latest Play Core library version dependency to avoid app crashes:…
-
Accessing localhost from Anywhere
You’ve spent hours working locally on your computer, getting that new website design to look just right. Your CMS is nicely set up with sample content and you want to test it out on a few mobile devices and tablets. Your client also wants to take a look — but you don’t have time to migrate it all to a public server to give them a quick peek. If you’re a web developer, chances are you’ve been in this situation…
-
Android RecyclerView, Android CardView Example Tutorial
Android RecyclerView and Android CardView got introduced in Android Lollipop with Material Design. For those who’re not aware of Material Design, its a comprehensive guide of UI Widgets introduced since Android 5.0 and it improves the visual appeal of the apps. Android RecyclerView Android RecyclerView is a more advanced, powerful and flexible version of the ListView. Android RecyclerView is similar to ListView except that it forces us to use RecyclerView.ViewHolder class to hold the elements which is not a compulsion…
-
Retrofit Android Example Tutorial
Welcome to Retrofit Android Example Tutorial. Today we’ll use the Retrofit library developed by Square to handle REST API calls in our android application. Retrofit Android Retrofit is type-safe REST client for Android and Java which aims to make it easier to consume RESTful web services. We’ll not go into the details of Retrofit 1.x versions and jump onto Retrofit 2 directly which has a lot of new features and a changed internal API compared to the previous versions. Retrofit…
-
Android Alert Dialog using Kotlin
In this tutorial, we’ll be discussing Alert Dialogs and implement them in our Android Application using Kotlin. Alert Dialogs Alert Dialog is a window that pops up on the screen. They generally show some information and ask for a user action. There are three core components that build an Alert Dialog. Title Text Message Text Buttons – There are three types of buttons: Positive, Negative, and Neutral To create an AlertDialog we use the AlertDialog.Builder inner class. val alertDialogBuilder =…
-
Android Date Time Picker Dialog
Android Date Time picker are used a lot in android apps. In this tutorial we’ll demonstrate the use of a Date Picker and Timer Picker Dialog in our android application. These components are used to select date and time in a customised user interface. We will use DatePickerDialog and TimePickerDialog classes with Calendar class in our android application code to achieve this. Android DatePickerDialog and TimePickerDialog Though a Date Picker and Time Picker can be used as independent widgets but…
-
Android Navigation Drawer Example Tutorial
In this tutorial we’ll implement a Navigation Drawer in our android application. Android navigation drawer is a sliding menu and it’s an important UI component. You will see navigation drawer in most of the android applications, it’s like navigation menu bars in the websites. Android Navigation Drawer Android Navigation Drawer is a sliding left menu that is used to display the important links in the application. Navigation drawer makes it easy to navigate to and fro between those links. It’s…
-
Android Shared Preferences Example Tutorial
In this tutorial we’ll use Shared Preferences in our android application to store data in the form of key-value pair. n Android Shared Preferences Overview Shared Preferences allows activities and applications to keep preferences, in the form of key-value pairs similar to a Map that will persist even when the user closes the application. Android stores Shared Preferences settings as XML file in shared_prefs folder under DATA/data/{application package} directory. The DATA folder can be obtained by calling Environment.getDataDirectory(). SharedPreferences is…