I have a custom layout that contains a progress bar over the main ListView. When the list is updated, I set the progress bar to indefinite. On JellyBean and above, this works well. However, in IceCream Sandwich, when set to undefined, it jumps a few pixels higher, enough to hide part of it in the ActionBar.
What would be the best way to get around this behavior?
Do you have two lanes with different marginTop values ββand switch between them, changing the appearance of the view when changing between deterministic and undefined modes? Changing the settings of the LayoutParams progress bar when changing modes? Or in some other way?
In both cases, I can do selective processing, so in the first case I would set different layouts for different versions of the API, and in the second I would change only LayoutParams if the SDK_INT value is less than 16.
Is there a better way to get around behavior? If not, which one will be "better"? It would probably be better here in terms of less use of resources and / or maintainability, but I would also be interested in the pros and cons of them.
source share