Apps PercentRelativeLayout only displaying API 23

Thread Starter

Rank:

None

Points:

Posts:

Joined:

Jul 13, 2016

Working with a `PercentRelativeLayout` (PRL from now on) to scale either `ImageViews` or `Buttons` based on screen size.

On the emulator running API 23, and on the XML preview API 23 - it looks and works beautifully. However when changing to any other API, including API 24 (or 16, etc), there is no display from `Button` or `ImageView`. Oddly enough `textView` will still show.

* Attempt a load on physical device (phone running API 16 and one API 17) with no luck

Really getting confused by this one. Any support appreciated. Really would love the simple solution as opposed to setting view percentages programatically.

Thanks

Narrowed down to not a problem with the physical device but with the API version itself. Have yet to find a solution as to how to make PRL visible across multiple APIs at least down to 16 and up to 24.

Moderator

Rank:

Points:

Posts:

Joined:

Oct 16, 2015

Never used the percent layout, but it looks handy. Does the ImageView show up in the UI builder? Have you tried shuffling the order of the components in the layout?
Dunno if this helps,but this guy seems to think it works with API 16-21. Check your build.gradle. Does it look correct?

Thread Starter

Rank:

None

Points:

Posts:

Joined:

Jul 13, 2016

It's incredibly useless for when it works. I actually used that link/article to learn about the PRL and set it up. The build.gradle only needed the addition of compile 'com.android.supportercent:24.0.0' and has since be synced.

The UI builder will display API 23, but no others.

Unfortunately moving the order around doesn't change anything. Since it works in API 23, I don't think it's an issue with the XML layout.