- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
在过去的几个小时里,我一直在努力弄清楚如何让它发挥作用,但我很挣扎。
我目前正在尝试制作一个具有四个选项卡按钮的应用程序,每个选项卡按钮都有自己的视口(viewport)js文件,这工作正常,但是在其中一个 View 上我需要显示 ListView 。
这就是我目前所拥有的,
MobileApp.views.Settings_screen = Ext.extend(Ext.List, {
title: "Settings ",
iconCls: "settings",
layout: 'fit',
initComponent: function() {
MobileApp.listPanel = new Ext.List({
id: 'indexlist',
store: MobileApp.listStore,
itemTpl: 'div class="contact">{firstName} {lastName}</div>'
});
},
items: [MobileApp.listPanel],
});
Ext.reg('settings_screen', MobileApp.views.Settings_screen);
但是,当我运行应用程序并单击设置选项卡栏按钮时,屏幕上没有显示任何内容。
任何帮助将不胜感激。
谢谢亚伦
最佳答案
我只能对您发布的代码进行评论,因此我无法告诉您您的选项卡栏是否有问题 - 但是这个 Settings_screen
有一些问题...
如果您要包含自己的 initComponent
函数,则需要从您的 initComponent
函数中调用其父类(super class)的 initComponent
函数...就像您的情况一样......
initComponent: function() {
MobileApp.views.Settings_screen.superclass.initComponent.call(this);
}
另一个问题是您在 initComponent
函数内创建 MobileApp.listPanel
,因此您无法像您尝试的那样将其包含在 items
数组中...而是一起删除 items 属性,并在创建后在 initComponent
函数中使用 this.add(MobileApp.listPanel)
。
您还需要更改Settings_screen以扩展Ext.Panel,您不向List组件添加List组件,您需要有一个容器..无论是另一个面板还是您的视口(viewport)容器的主体..
这些更改是否足以使其正常工作将取决于您未发布的代码是否存在问题。
关于java - SenchaTouch ListView 在视口(viewport)中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7232514/
嗨,我一直在寻找 secnhatouch 字段的 readOnly 属性,但没有找到它......有人可以帮助我解决这个问题吗 { xtype: 'textfield
我已经构建了一个破损的工作示例 here 。第一次加载页面时,默认值将加载到表单中。当您更改数据并刷新时,将显示上次更改的值。但是,在第一次页面查看(再次刷新)之后,不会保留进一步的更改,因为它看起来
我正在 SenchaTouch 中创建一个应用程序。另外,我将使用 PHONEGAP 为 ios、android 和黑莓进行部署。在应用程序中,我需要打印一些详细信息,例如收据。我不知道如何使打印功能
我不熟悉使用 Sencha Touch 开发 Android 应用程序。按照 Hybrid applications using phonegap and sencha touch 中的文档进行操作我
在过去的几个小时里,我一直在努力弄清楚如何让它发挥作用,但我很挣扎。 我目前正在尝试制作一个具有四个选项卡按钮的应用程序,每个选项卡按钮都有自己的视口(viewport)js文件,这工作正常,但是在其
我是phonegap开发环境的新手,我想使用Sencha touch来构建我的iPhone应用程序。请有人指导我如何使用sencha touch来构建我的iPhone应用程序?我想要步骤,我将如何在
我在尝试使用 Sencha Touch 和 PhoneGap 构建 Android 应用程序时遇到问题。 我正在使用 PhoneGap v1.2.0、Sencha Touch 2.0.0 pr3 构建
我正在使用 SenchaTouch2 开发 Android 应用程序。我使用一个 480px 宽的 png 文件作为背景图像以适应 GalaxySII,它有 480px 宽度。它在浏览器中非常好,但在
我有一个数据存储,它从我服务器上的 JSON API 获取信息。当我在 WebKit/Chrome 中运行代码时,一切似乎都运行良好,但如果我将用户代理更改为 iPhone 4.1 等,则似乎 JSO
当您想要使用 localStorage 时,您应该如何在应用程序中保存/加载设置?假设我们只想保存用户名和密码。 目前我知道两种选择: 使用带有存储和代理的模型。 这似乎有点太“大”,因为您只想存储一
背景:我在所有 View 中使用相同的工具栏,该工具栏是在单独的 View 中定义的。该工具栏有四个按钮。由于该按钮具有 'id' 属性, View 中一个按钮上的点击事件也会触发其他 View 中类
我是一名优秀的程序员,十分优秀!