Common Issues

ViewPager PagerAdapter not updating the View

 

person shubham sharmaaccess_time September 10, 2018launch Read More

ViewPager PagerAdapter not updating the View

There are several ways to achieve this. The first option is easier, but bit more inefficient. Override getItemPosition in your PagerAdapter like this:

This way, when you call notifyDataSetChanged(), the view pager will remove all views and reload them all. As so the reload effect is obtained. The second option, suggested by Alvaro Luis Bustamante (previously alvarolb), is to setTag()method in instantiateItem() when […]

person shubham sharmaaccess_time July 20, 2018launch Read More

Moving and resizing DrawerLayout’s content on sliding

You can do this by translating and scaling the content View in the onDrawerSlide() method of a DrawerListener on your DrawerLayout. Since the content View itself is resizing, and there’s a separate TextView that appears in the bottom right corner, we’ll stick both of these in another holder ViewGroup. If that label TextView isn’t needed, the holder ViewGroup can be omitted, as well. A basic DrawerLayout setup for the example:

  The […]

person shubham sharmaaccess_time June 6, 2018launch Read More

What are RecyclerView advantages compared to ListView?

With the advent of Android Lollipop, the RecyclerView made its way officially. The RecyclerView is much more powerful, flexible and a major enhancement over ListView. I will try to give you a detailed insight into it. Advantages 1) ViewHolder Pattern In a ListView, it was recommended to use the ViewHolder pattern but it was never a compulsion. In […]

person shubham sharmaaccess_time April 16, 2018launch Read More

Add/Include/inflate layout into a View Group

 

person shubham sharmaaccess_time December 28, 2017launch Read More

Create a Splash Screen with Video in Android

Splash Screen In this quick tutorial we will see how to implement a Video Splash Screen in your app. Splash Screens are normally shown for a few seconds as a progress while the app is ‘booting up’  i.e performing a version check or initialising the Analytics etc. Sometimes the Splash Screen is also used to showcase the app […]

person shubham sharmaaccess_time September 20, 2017launch Read More

Clear Cache in Android Application programmatically

If you are looking for delete cache of your own application then simply delete your cache directory and its all done !

  And you may require following permission to add in your manifest file in order to delete cache of other application

 

person shubham sharmaaccess_time May 25, 2017launch Read More

Service Thread IntentService AsyncTask

Android Thread Constructs(Part 4): Comparisons In this series of posts we have seen the following thread constructs: 1. Basic threads and communication between them [see article] 2. Understanding the Main thread or the UI thread [see article] 3. IntentService [see article] 4. AsyncTask [see article] NOTE:  These are Android specific constructs. Android also includes the […]

person shubham sharmaaccess_time May 19, 2017launch Read More

Android view lifecycle

What is View? View class represents the basic building block for user interface components. A View occupies a rectangular area on the screen and is responsible for drawing and event handling. View is the base class for widgets, which are used to create interactive UI components (buttons, text fields, etc.). The ViewGroup subclass is the […]

person shubham sharmaaccess_time April 19, 2017launch Read More