Sorting 尝试对过滤列表排序时,Android上的Gluon移动应用程序崩溃
我想挑选一个观察者。该代码在桌面上运行良好,但在Android上崩溃。我在NetBeans上使用Gluon移动插件。我尝试过很多选择,但都没有成功 备选案文1:Sorting 尝试对过滤列表排序时,Android上的Gluon移动应用程序崩溃,sorting,mobile,sortedlist,gluon,Sorting,Mobile,Sortedlist,Gluon,我想挑选一个观察者。该代码在桌面上运行良好,但在Android上崩溃。我在NetBeans上使用Gluon移动插件。我尝试过很多选择,但都没有成功 备选案文1: ObservableList<Producto> sortdata = mainFilteredList().stream() .sorted(Comparator.comparing(Producto::getCampo04)) .collect(Collectors.toCollection(FXCollection
ObservableList<Producto> sortdata = mainFilteredList().stream()
.sorted(Comparator.comparing(Producto::getCampo04))
.collect(Collectors.toCollection(FXCollections::observableArrayList));
observeList sortdata=mainFilteredList().stream()
.排序(比较器.比较(Producto::getCampo04))
.collect(Collectors.toCollection(FXCollections::observearraylist));
备选案文2:
SortedList<Producto> sortedListx = mainFilteredList.sorted((prod1, prod2) -> prod1.getCampo04().compareToIgnoreCase(prod2.getCampo04()));
SortedList-sortedListx=mainFilteredList.sorted((prod1,prod2)->prod1.getCampo04().compareTignoreCase(prod2.getCampo04());
备选案文3:
FilteredList<Producto> sortedList = new FilteredList<>(mainFilteredList().sorted((prod1, prod2) ->
prod1.getCampo04().compareToIgnoreCase(prod2.getCampo04())));
FilteredList-sortedList=new-FilteredList(mainFilteredList().sorted((prod1,prod2)->
prod1.getCampo04().compareTignoreCase(prod2.getCampo04());
其中:Producto->是一个模型,getCampo04->是模型中的一个属性,mainFilteredList()->是一个带有项目的Producto的过滤列表
任何帮助都会很有用。有可用的崩溃信息吗?Glion Mobile还不支持
流。如果你想使用Streams,你需要libraryHi。谢谢你的回答。我没有这次撞车的记录。我只得到一个空白视图。除了流
,默认方法
也可能是一个问题。我不确定在最新的glion移动版中是否默认启用了default方法
,或者您是否必须通过retrolambda{defaultMethods true}
启用它。