我正在开发一个 android 应用程序,它将允许用户创建民意调查。用户可以创建问题并提供一组选项。
我想提供一个功能,用户可以在其中动态添加或删除选项。
我无法决定哪种布局最好。
TableLayout - 每行可以包含一个选项。与 RecyclerView - 每个项目都可以是一个选项。
(请注意,每个选项实际上都是一个 EditText 视图,用户必须在其中输入选项内容。)
我见过人们通常将 RecyclerView 用于非常大的数据集,但对于我的用例,用户最多可以添加 5 或 6 个选项。除此之外,我将使用回收器视图来收集数据。对于这样的用例,使用 RecyclerView 或其他东西是一个不错的选择吗?
请提供建议
我是intellij第一次使用,我无法运行任何程序.它构建时没有任何错误或警告,但是当我运行时,它会抛出class not found exception.我尽我所能
但没有运气.
Exception in thread "main" java.lang.ClassNotFoundException: com.nectarmicrosystems.libgdx.learning.desktop.DesktopLauncher
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:122)
Run Code Online (Sandbox Code Playgroud)
班级来源:
package com.nectarmicrosystems.libgdx.learning.desktop;
import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;
import com.nectarmicrosystems.libgdx.learning.MyGdxGame;
public class DesktopLauncher {
public static void main (String[] arg) {
LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
new LwjglApplication(new MyGdxGame(), config);
}
}
Run Code Online (Sandbox Code Playgroud)
I'm working on a Jenkins plugin and I'm now stuck at a point where I'm trying to get the return value of a method using a JavaScript proxy as described here.
I simply want to call this kotlin method:
@JavaScriptMethod
fun getMonitoredJobsAsJSON(): JSONArray = toJSON(getObjectMapper().writeValueAsString(getMonitoredJobs())) as JSONArray
Run Code Online (Sandbox Code Playgroud)
From the jelly script using this:
<script>
var board = <st:bind value="${it}"/>
board.getMonitoredJobsAsJSON(function(data) {
//
})
</script>
Run Code Online (Sandbox Code Playgroud)
This actually works when I disable CSRF protection on the Jenkins server but I obviously …