- This topic has 18 replies, 6 voices, and was last updated 11 years, 7 months ago by
lemorlenny.
-
AuthorPosts
-
dabbeljuMemberHi all,
I have a panel which can be scrolled. Depending on the screen, I have more or less items to show in that panel. Is there any way to make the content area hide dynamic?
best
dabbeljuJuly 19, 2012 at 3:56 pm #328352
dabbeljuMemberNo ideas? 🙁
July 20, 2012 at 2:40 pm #328374
support-octavioMemberHi dabbelju,
What kind of items are you adding to your panel? Are they listItems or similar? Or they are a mix of widgets?
July 20, 2012 at 6:05 pm #328377
dabbeljuMemberHi Octavio,
just listItems. No mix of items.
Thanks
dabbeljuJuly 30, 2012 at 7:27 pm #328596
support-octavioMemberHi dabbelju,
After calculate your content area height you should use this snippet:
$(“#m1-project-panelname-scroller”).height(panelHt);
Let me know how it goes. If necessary I can share an example.
July 31, 2012 at 12:37 pm #328620
torybashMemberHi octavio,
I have this problem too. However I can easily use
$("#m1-project-panelname-scroller").height(panelHt);
to adjust a panels height, but inside the panel I’ve got a text widget with a variable size (the text is retrieved from an RSS-feed).
Is there some way to retrieve the height (or number of lines) of a text-widget?
I’ve tried using$('#m1-main-text').height();
but this only returns the height set in MobiOne.
Thanks,
torybashAugust 1, 2012 at 1:54 pm #328656
support-octavioMemberHi torybash,
I’m not sure if I saw in the populate custom list example of Wayne or other projects, a possible workaround would be create a sub string of your text widget. That will do all your text widgets have the same height.
See: http://www.w3schools.com/jsref/jsref_substr.asp
Anyways, I’ll ping tomorrow the dev team to know their opinion.
August 2, 2012 at 3:54 pm #328695
dabbeljuMemberHi octavio,
it does not work for me. I did play arround with it and I can set the panel’s height through this, but not the “scrollers” height.
I think it does not work, cause it comes as inline style and I think I can not overwrite it.
Any other ideas?
best
dabbeljuAugust 3, 2012 at 5:57 am #328723
dabbeljuMemberHi octavio,
Just for information: I did try also this, without success.
$(‘#m1-spielplan_overview-panel1-scroller’).css(‘height’, ’20px’);
best
dabbeljuAugust 9, 2012 at 4:33 am #328950
dabbeljuMemberHi,
just wanted to say, that I got arround the problem. When I took a look at the dom inspector, I did recognize, that the setting was there, but somehow overwritten. So I added the following:
$(‘#m1-spielplan_overview-panel1-scroller’).css(‘height’, ’20px !important’);
and it works now for me.
Thanks and best
dabbeljuAugust 29, 2013 at 5:34 am #341954
bmvankesselMemberThis only works in the Test Center when followed by phoneui.forceLayout. After building and downloading the app to my android phone it did not work anymore. So there must be a slight difference between the Dev Center and Cloud environment. Any other suggestions?
August 29, 2013 at 2:23 pm #341971
support-octavioMemberHi bmvankessel,
Can you share a sample project that demonstrate the issue? After reviewing it we can give you an advice.
September 11, 2013 at 9:52 pm #342334
Unknown AuthorParticipantI have this issue now too, under 2.9. Never had this happen under 2.2.
September 12, 2013 at 6:54 pm #342364
support-octavioMemberHi 1thinchip,
Can you share a sample project that demonstrate the issue? Does it happen on android, iOS, Test Center, Web SIM? Also, since this thread discusses resizing panel and someone else is dicking with scroller via css, can you share details about the problem you are having?
October 25, 2013 at 8:25 am #343816
lemorlennyMember@support-octavio wrote:
Hi 1thinchip,
Can you share a sample project that demonstrate the issue? Does it happen on android, iOS, Test Center, Web SIM? Also, since this thread discusses resizing panel and someone else is dicking with scroller via css, can you share details about the problem you are having?
Hi Octavio,
I have same problem when I try to resize the panel scroller height, it works fine in development but not when installed on device, have some workaround?Regards
Android JellyBean 4.2.2
Mobione 2.3.2(1,20130425)function PrepareList(Result) { // call the page phoneui.gotoPage("m1-ListC",phoneui.transitions.slideLeft); var list = $('#m1-ListC-list1'); $(list).empty(); // clear list // data separator pipe var aResult = Result.split("|"); for(idRow = 0; idRow < (aResult.length-1); idRow ++) { // fields separator comma aRowElements = aResult[idRow ].split(","); var url_logo = aRowElements[11]+'" alt="testo" width="'+((parseInt(myWidth)/100)*40) var id = "m1-ListC-listItem1" ; $(list).append( '<li id="m1-ListC-listItem1" class="' + (idRow == 0 ? 'm1-first' : '') + (idRow == (aResult.length - 1) ? 'm1-last' : '') + 'm1-clickable m1-article-listItem m1-highlight m1-background-4 m1-background-5 m1-background-6" IdCenter='+aRowElements[0]+'>'+ '<div id="m1-ListC-txtCenterName" class="m1-text m1-font-3 m1-active-color-1">'+aRowElements[1]+'</div>'+ '<img id="m1-ListC-imgCenter" class="m1-clickable m1-image" src="'+url_logo+'"/>'+ '<div id="m1-ListC-txtCenterSite" class="m1-text m1-active-color-1 m1-font-4">'+aRowElements[3]+" ("+aRowElements[5]+")"+'</div>'+ '</li>' ); } // ************* // - THIS SECTION WORKS ONLY IN DEVELOP ENVIRONMENT // set the panel height according to the rows number var PanelH=70*(idRow); $('#m1-ListC-panel1-scroller').css('height', PanelH+'px !important'); // ************* phoneui.preprocessDOM(list); phoneui.hideActivityDialog(); //add click handler to all list-items var listItems = $(list).children(); $.each(listItems, function(i,listItem) { $(listItem).click(function(e) { var idx = parseInt($(this).attr("IdCenter")); CenterPage(idx); }); }); }
-
AuthorPosts