Gluon Mobile: Unable to scroll to bottom of scrollPane in Android -


i use splashview show eula when app started first time:

<scrollpane fx:id="pnecontent"  fittowidth="true" xmlns="http://javafx.com/javafx/8.0.60" xmlns:fx="http://javafx.com/fxml/1"> <vbox id="boxeula" spacing="8" fillwidth="true">     <padding>         <insets top="0" right="16" bottom="16" left="16"></insets>     </padding>     <textview fx:id="txteula" id="txteula" />     <hbox spacing="24" alignment="center">         <button fx:id="btndecline" text="%button.decline" styleclass="touch-target" />         <button fx:id="btnaccept" text="%button.accept" styleclass="touch-target" />     </hbox> </vbox> 

textview extends textflow , adds convenience methods, no layout logic. contains several links opened in browser. when navigate browser splashview i'm not able anymore scroll buttons @ bottom of scrollpane.

a listener attached scrollpane.vvalueproperty showed vmaxvalue of '1' reached before bottom of scrollpane showing.

i've tried update scrollpane content by:

 servicehelper.call(lifecycleservice.class, s -> s.addlistener(lifecycleevent.resume, () -> pnecontent.requestlayout())); 

without success.

 public eulapresenter(splashview splash, trigger oneulaaccepted) {     this.splash = splash;     this.oneulaaccepted = oneulaaccepted; }  @fxml protected void initialize() {     txteula.addtextwithlinks(eula.gettext(), 3);      btndecline.setonaction(evt -> servicehelper.call(lifecycleservice.class, lifecycleservice::shutdown));     btnaccept.setonaction(evt ->         {             dispose();             oneulaaccepted.start();         });      splash.setcenter(pnecontent);     initfab();      clickedonscrollfilter = new mouseclickedonscrollfilter(pnecontent);     clickedonscrollfilter.activate();      listeners.executeoncewhen(pnecontent.layoutboundsproperty(), () -> !pnecontent.isfocused(), e -> platform.runlater(() ->         {             pnecontent.setvvalue(0);             pnecontent.setopacity(1);         })); }  private void initfab() {     fab = new floatingactionbutton();     fab.setfloatingactionbuttonhandler(floatingactionbutton.top_right);      fab.textproperty().bind(new when(pnecontent.vvalueproperty().isequalto(pnecontent.vmaxproperty())).then(materialdesignicon.arrow_upward.text)                                                                                                       .otherwise(materialdesignicon.arrow_downward.text));     fab.setonaction(e ->         {             if (fab.gettext() == materialdesignicon.arrow_downward.text) {                 pnecontent.setvvalue(pnecontent.getvmax());             } else {                 pnecontent.setvvalue(pnecontent.getvmin());             }         });      splash.getlayers().add(fab.getlayer()); }  private void dispose() {     splash.getlayers().remove(fab.getlayer());     fab.textproperty().unbind();     fab = null;      clickedonscrollfilter.deactivate();     clickedonscrollfilter = null; } 

}


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -