Android programming

SwipeRefreshLayout in Android | AndroidMonks

SwipeRefreshLayout in Android with Example Android SwipeRefreshLayout is a ViewGroup that can hold only one scrollable child. It can be either a ScrollView, ListView or RecyclerView. The basic need for a SwipeRefreshLayout is to allow the users to refresh the screen manually. According to the Docs, “The SwipeRefreshLayout should be used whenever the user can refresh …

SwipeRefreshLayout in Android | AndroidMonks Read More »

AsyncTask with Progressbar Example | AndroidMonks

 AsyncTask with Progressbar with Example According to the Android Docs, “AsyncTask enables proper and easy use of the UI thread. This class allows you to perform background operations and publish results on the UI thread without having to manipulate threads and/or handlers”. Now that you know what a AsyncTask is, we will use the Async …

AsyncTask with Progressbar Example | AndroidMonks Read More »

Singleton for FusedLocationProviderClient

Creating a Singleton for FusedLocationProviderClient This is a quick tutorial on how to create a singleton for FusedLocationProviderClient in Android. Hoping that you know what a FusedLocationApi used to do(It is deprecated now). The Android Library has the Fused Location Provider Client that is responsible for capturing the location updates from the user. You can …

Singleton for FusedLocationProviderClient Read More »

ViewAnimator in Android | AndroidMonks

ViewAnimator in Android with Example ViewAnimator is a Base class of a FrameLayout, which defines the Animation on it when switching between views. ViewAnimator can be altered in order to change the in-Animation and out-Animation of the FrameLayout or defining custom animation to the Views at hand. We will see, how to create a simple …

ViewAnimator in Android | AndroidMonks Read More »

Chronometer in Android | AndroidMonks

Chronometer in Android | AndroidMonks Chronometer in Android is useful to implement a simple Timer. It is a subclass of TextView however holds a countdown or count up timer. According to the Android Docs, You can give it a start time in the SystemClock.elapsedRealtime() timebase, and it counts up from that, or if you don’t give it …

Chronometer in Android | AndroidMonks Read More »

ViewStub in Android | AndroidMonks

ViewStub in Android with Example According to the Android Docs, “A ViewStub is an invisible, zero-sized View that can be used to lazily inflate layout resources at runtime”. This means that, it creates a dynamic creation of the View during the runtime of the app rather than Compile time creation (i.e). Consider the case of …

ViewStub in Android | AndroidMonks Read More »

WebView in Android | AndroidMonks

 WebView in Android with Example In Android, WebView is used to show the WebSite inside your Android application. This seems pretty straightforward, but there are some important concepts to understand to create a good neater looking Web View. We will be depending on the Web View Tag and the Class to Load, show and change …

WebView in Android | AndroidMonks Read More »

CheckedTextView in Android | AndroidMonks

CheckedTextView in Android with Example CheckedTextView is used in order to provide Checkable interface support to TextView. According to the Google Docs, “This is useful when used in a ListView where the setChoiceMode has been set to something other thanCHOICE_MODE_NONE.” This means that, we can make use of the CheckedTextView inside a ListView without any Choice Mode set. TextView …

CheckedTextView in Android | AndroidMonks Read More »

ZoomControls in Android | AndroidMonks

ZoomControls in Android with Example How often have you seen the +- button that depicts the ZoomControls action in Android Apps. These are a major part of creating a Book reader, or a e-shopping applications. The need for Zoom Controls was very high after the use of high quality images, because people wanted to zoom …

ZoomControls in Android | AndroidMonks Read More »

TableLayout in Android with Example | AndroidMonks

TableLayout in Android with Example | AndroidMonks TableLayout is used to represent Table like View alignment in Android. There are various ways in which you can achieve a table like representation. however TableLayout makes it easy to create one. A TableLayout consists of a number of TableRow objects, each defining a row (actually, you can have other …

TableLayout in Android with Example | AndroidMonks Read More »