PercentRelativeLayout okay on Emulator, not okay on phone

后端 未结 2 2029
后悔当初
后悔当初 2021-01-26 02:00

I\'ve just implemented PercentRelativeLayout. I\'ve added: compile \'com.android.support:percent:24.2.0\' to the gradle so Android Studio at least reco

2条回答
  •  灰色年华
    2021-01-26 02:27

    Finally figured this out. Problem was actually in the XML. Posting here for reference in hopes someone will find it helpful in the future.

    The problem came from setting layout_heightPercent and layout_widthPercent. For some reason this does not allow the view in question to display. I do not believe it has anything to do with scaling the aspect ratio as the problem exists with buttons as well (with no aspect ratio to maintain.)

    But if you're having visibility problems with a PercentRelativeLayout, see below.

        
    

提交回复
热议问题