Problem
I have a strange problem that I cannot understand, and I need other eyes. I dynamically created a ProgressBar view and it works on various devices and AVDs, with the exception of my Motorola Xoom.
Screenshots
All screenshots have the name of the device above them and are reduced by about 50% of what it captured via ADT, with the exception of the Nexus 10, which is 25% due to this high resolution. A red background for the ProgressBar is added for debugging purposes to show that the view is and is visible. I added left and top margins to center it.
The screenshots below are from the Xoom, where it doesn't work, and is followed by the Nexus 10 (AVD), Nexus 7, Galaxy Nexus and HTC Droid Incredible, demonstrating that it works everywhere. After the shots I will add my code.
Motorola Xoom not working
Progress bar not working! But note that the view is visible (we see a red background).

Works great on other devices
Circle progress is displayed on all of these devices.
Imitation Samsung Nexus 10

ASUS Nexus 7

Samsung Galaxy Nexus

HTC Droid Incredible

Code now
This creates a parent view that contains it:
RelativeLayout discoverListLayout = new RelativeLayout(mContext);
discoverListLayout.setLayoutParams(params);
discoverListLayout.addView(mDiscoverList);
mDiscoverList is a list view that is ultimately displayed. The ProgressBar loads on top of it before the list loads.
Now create and configure a progress bar. I am setting up padding onGlobalLayout, because otherwise the objects have a width and height of 0.
mDiscoverLoading = new ProgressBar(mContext);
params.height = ViewPager.LayoutParams.WRAP_CONTENT;
params.width = ViewPager.LayoutParams.WRAP_CONTENT;
mDiscoverLoading.setLayoutParams(params);
mDiscoverLoading.setIndeterminate(true);
discoverListLayout.addView(mDiscoverLoading);
ViewTreeObserver vto = mDiscoverLoading.getViewTreeObserver();
vto.addOnGlobalLayoutListener(new OnGlobalLayoutListener() {
@SuppressWarnings("deprecation")
@Override
public void onGlobalLayout() {
if (mDiscoverList.getCount() > 0) {
processLoadedList(true);
} else {
mDiscoverLoading.setBackgroundColor(getActivity().getResources().getColor(R.color.stitchoid_red));
mDiscoverLoading.setPadding((getView().getWidth() / 2) - (mDiscoverLoading.getWidth() / 2),(getView().getHeight() / 2) - (mDiscoverLoading.getHeight()), 0, 0);
}
ViewTreeObserver obs = mDiscoverLoading.getViewTreeObserver();
obs.removeGlobalOnLayoutListener(this);
}
});
, , Motorola Xoom!? , . , , .
!
* : , , , , : ProgressBar match_parent ( ), , Xoom it , ( xoom).