问题标签 [proteus]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
153 浏览

android - 获取运行时可用的 TextField 列表?

我正在使用一个名为Proteus的 android 库,它在运行时使用我们位于服务器上的 JSON 文件来扩展布局。这个库允许数据绑定,但我的问题是如何在使用我的应用程序时从这些字段中获取数据?我无法引用布局的任何标识符,因为它们在编译期间不存在。当 (R.id.input) 直到运行时才实际存在时,有没有办法忽略语句中的错误?:

或者可能在运行时以编程方式获取所有可用唯一标识符的列表?任何信息都会有帮助。谢谢你。

0 投票
1 回答
247 浏览

android - Is there any way disable caching in webview inflated through proteus

Need to disable the cache on WebViews inflated through Proteus.

Are there any attributes on the WebView which can be used to disable it?

We could find the view normally would if it was inflated using precompiled XML layouts using findViewById(R.id.something) and call the following methods on it.

But since proteus inflates layouts using JSON from the server I cannot find the view like this and the solution would not scale for multiple WeViews.

0 投票
1 回答
133 浏览

android - 为了有效地使用 proteus,我需要在 node.js 环境中托管文件还是 php 可以正常工作?

在 github proteus 上说要在本地测试 proteus 安装 node.js 。我知道这听起来是一个很愚蠢的问题,但我只是古玩,但它。我问这个问题是因为当我在 node.js 和带有 php 环境的实时服务器上托管文件时,我在本地测试 proteus 时观察到了性能差异。使用 node.js 渲染速度非常快,但使用 php 并非如此。我不是后端开发人员,所以我对此不太了解,如果我错了,请纠正我。

0 投票
1 回答
669 浏览

android - 在 Android 片段中使用 Proteus,但在投射充气机时出错 - Proteus Android 布局引擎

请检查我的代码:

我想使用 Proteus 库来创建一个视图并将其呈现为一个片段。

你能告诉我我做错了什么吗?使用此代码,我收到以下错误:

com.android.internal.policy.PhoneLayoutInflater 无法转换为 com.flipkart.android.proteus.ProteusLayoutInflater

0 投票
1 回答
235 浏览

java - 如何使用 Proteus Android 布局引擎实现级联资产

我想从 Proteus 库生成级联资产。我是 android 开发的新手,在@adithya(Proteus 的开发人员)的帮助下,我设法用库构建了一个动态视图。

我想要简单的是假设有一个单选按钮的值是单选按钮我需要在单选按钮的下方添加更多资产

它就像你有孩子?如果是,下面应该加载多少个子文本框

像这样

0 投票
1 回答
368 浏览

android - Dynamically load cascading Questions in Android View

We are currently working on project where a web user creates a survey which has cascading questions (cascading means questions that have few answers and depend on those answers rest of the questions changes) and then mobile users should get this survey in their android app. Sample JSON structure we thought is as follows:

Is there anyway to achieve such a thing? What are the most suitable library which can be used for this scenario? We tried json2view, proteus. From all those we can pass a json and load the view but if there are cascading questions non of them can use.

Furthermore elaborating in the question via an example: Suppose the user is given the question of Do you have any have kids?. This question has possible two answers. Yes & No depending upon the answer which user give others questions have to be loaded dynamically.

0 投票
1 回答
125 浏览

proteus - 如何在 Java 中使用 Flipkart Proteus 库?

我正在尝试使用 Proteus 库,但我不知道如何实现该库的功能。有人可以解释或分享一些java代码让我更好地理解它。

0 投票
1 回答
93 浏览

android - 包含 proteus 库时出错 - “android.support.v7.appcompat.R$layout”

下面是 app/build.gradle 文件

错误 -

错误:程序类型已存在:android.support.v7.appcompat.R$layout

完全错误 - https://gist.github.com/sisogit/055c93ddc08b1e24c6ae0e4c6f1129f0

试图从 proteus 中排除一些库作为exclude标记,但没有帮助。

请帮忙。

步骤 - 1. 在工作室中创建空项目。

  1. 运行>>正常工作

  2. 添加implementation ('com.github.flipkart-incubator:proteus:5.0.0-rc12')并运行项目

它会给出错误

0 投票
1 回答
43 浏览

proteus - proteus 是否支持 onKey up/down 事件

我想获取有关使用 proteus 创建的页面的信息,例如用户使用某些遥控器执行的关键事件。

是否有可能获得 onKeyUp 或 onKeyDown 事件,如本机代码。

0 投票
0 回答
204 浏览

android - 我想在我的 android 代码中添加 proteus 插件。是否有任何最新的 proteus 依赖项?如何以及在哪里找到它们?

使用 groupId com.android.support 和 androidx.* 的依赖无法合并但发现 IdeMavenCoordinates{myGroupId='com.android.support', myArtifactId='coordinatorlayout', myVersion='28.0.0', myPacking='aar', myClassifier='null'} 和 IdeMavenCoordinates{myGroupId='androidx.versionedparcelable', myArtifactId='versionedparcelable', myVersion='1.0.0', myPacking='aar', myClassifier='null'} 不兼容的依赖项...( Ctrl+F1) 检查信息:有一些库或工具和库的组合不兼容,或者可能导致错误。一种这样的不兼容性是使用不是最新版本的 Android 支持库版本(或者特别是低于您的 targetSdkVersion 的版本)进行编译。问题 ID:GradleCompatible

我在使用 proteus 依赖项时遇到 gradle 兼容性问题。我的 gradle 是 com.android.support:appcompat-v7:28.0.0 但 proteus 依赖项是 5.0.0 。这给了我依赖问题?我有什么办法解决这个问题?