+1
En revisión

height="fit" with android

sovtek hace 7 años actualizado hace 7 años 5
Ever have any issues using height="fit" within android? When viewing my app within iPad it looks as expected. When viewing in android, the text is not visible at all.

Unless there is something wrong with the code below that causes android to mess up:


<panel name="tocStoryL" width="50%" height="195" align="left" onclick="loadStoryFromTOC" clicktarget="../../MAG" _storyStartPos="[param:posL]">
<panel name="tocImgCntnr" width="35%" height="80%" xpos="5" ypos="5">
<image name="tocStoryImg" source="[param:imgSrcL]" width="100%"></image>
</panel>
<panel name="tocInfo" width="58%" height="fit" align="right" rightpad="5%">
<text name="tocStoryName" width="100%" height="fit" alignment="left" rightof="tocImgCntnr" ypos="10" font="HelveticaNeue-Light" size="20" color="#FFFFFF" text="[param:nameL]" onclickup="hideToc" onclick="page" clicktarget="../../MAG" _page="[param:posL]"></text>
<text name="tocStoryInfo" width="100%" height="fit" alignment="left" rightof="tocImgCntnr" bottomof="tocStoryName" font="HelveticaNeue-Light" size="12" color="#ebebeb" text="[param:infoL]"></text>
</panel>
<panel name="tocBtmInfo" width="60%" height="30" align="right" valign="bottom">
<text name="tocStoryAuthor" lwidth="290" width="180" height="30" alignment="left" font="HelveticaNeue" size="12" color="#7f7f7f" text="[param:authorL]"></text>
<text name="tocStoryPos" width="25" height="30" alignment="left" align="right" font="HelveticaNeue" size="12" color="#7f7f7f" text="[param:posL]"></text>
</panel>
</panel>

My records show that a bug surrounding height="fit" was fixed 5 days ago, so it should go out in the next version of fusebox for Android.

I could possibly release that this week if things go well and that should correct your issue.
That would be great, thanks!
Just checking on this.
The bug has been fixed and I am still testing a few other things before I push out a new Android fusebox.

In the meantime I took a deeper dive at your code above and I am not sure how I missed this on the first look, but you have this below:


<panel name="tocInfo" width="58%" height="fit" align="right" rightpad="5%">
<text name="tocStoryName" width="100%" height="fit" alignment="left" rightof="tocImgCntnr" ypos="10" font="HelveticaNeue-Light" size="20" color="#FFFFFF" text="[param:nameL]" onclickup="hideToc" onclick="page" clicktarget="../../MAG" _page="[param:posL]"></text>
<text name="tocStoryInfo" width="100%" height="fit" alignment="left" rightof="tocImgCntnr" bottomof="tocStoryName" font="HelveticaNeue-Light" size="12" color="#ebebeb" text="[param:infoL]"></text>
</panel>


The problem you are facing can be easily fixed. height="fit" is not appropriate for your panel. It really should be fitheight="yes" This will make sure the panel is the exact size of all its children combined. Then your text tags will size based on the size of the fonts. And all will be right in the world.

Sorry for the confusion and the delay on the solution. Let me know if that works for you.
Worked Ian, thanks.