简体   繁体   English

Adobe Air-Starling /功能| 控件和设备模拟器

[英]Adobe Air - Starling/Features | Controls and device simulator

I have few questions here, regarding creating app in Adobe Air using Starling and feathers. 关于使用Starling和Feather在Adobe Air中创建应用的问题,我在这里有几个问题。

I created yet a very simple app, which has Feathers list controller with static data provided to its dataProvider. 我创建了一个非常简单的应用程序,该应用程序具有Feathers列表控制器 ,并向其dataProvider提供了静态数据。 According to the code it should work fine, but there are three major issues I am facing. 根据代码,它应该可以正常工作,但是我面临三个主要问题。

1: Touch/Click Positions 1:触摸/点击位置

I am using: 我在用:

list.addEventListener( Event.CHANGE, list_changeHandler );

Now the problem is, clicking coordinates are not correct. 现在的问题是,单击坐标不正确。 Clicking on 3rd Item triggered 4th item, to trigger 3rd, 2nd item needs to be clicked it's half way through etc. 单击第三项触发了第四项,要触发第三项,需要单击第二项,这需要进行到一半。

2: Nothing, without Theme 2:一无所有,没有主题

I am using a custom theme, came along with a tutorial. 我使用的是自定义主题,并附带了教程。 If I don't use the theme, I am unable to see anything on the screen, somehow. 如果我不使用主题,则无法以某种方式在屏幕上看到任何内容。

3: Resolution (Device Simulator) Problem 3:解决(设备模拟器)问题

Though buggy, but it works with Theme, but my app doesn't fit with the resolution for each device simulator. 虽然有问题,但可以与主题配合使用,但是我的应用程序与每个设备模拟器的分辨率都不匹配。 Either its, iPad or iPhone 4 or any android simulator. iPad,iPhone 4或任何Android模拟器。

Also, can anyone please also explains, what is significance and use of Context3D render mode in starling class. 另外,任何人还可以请您解释在starling类中Context3D渲染模式的意义和用途是什么。

Any help is appreciated: 任何帮助表示赞赏:

Thanks in advance Waqar Iqbal 在此先感谢Waqar Iqbal

Starling is a Stage3D framework that displays content directly on graphic card using Context3D. Starling是一个Stage3D框架,可使用Context3D在图形卡上直接显示内容。 Everything displayed by Starling is always under the regular display list. Starling所显示的所有内容始终位于常规显示列表下。 Feather is a component framework based on Starling. Feather是基于Starling的组件框架。

  1. Stage3D cannot handle any mouse operations so Starling and Feather simulate all their mouse event (those mouse event never really happen anywhere, they are created by calculation of mouse position on the stage) Stage3D无法处理任何鼠标操作,因此Starling和Feather会模拟其所有鼠标事件(这些鼠标事件永远不会真正发生在任何地方,它们是通过在舞台上计算鼠标位置来创建的)

  2. not sure, never used Feather 不确定,从未使用过羽毛

  3. Starling does not handle screen density and dpi calculation, if you want your app to fit any screen you'll have to handle it yourself. Starling无法处理屏幕密度和dpi的计算,如果您希望您的应用适合任何屏幕,则必须自己处理。

I think you should see the example carefully. 我认为您应该仔细查看示例。 if u want to use any feathers component either you have to use feathers theme or custom theme. 如果要使用任何羽毛组件,则必须使用羽毛主题或自定义主题。

if you use feather theme you need to provide theme path and before using any component you need to initialize that theme.Then use component any where.without theme you will not see any thing. 如果您使用羽毛主题,则需要提供主题路径,并且在使用任何组件之前需要初始化该主题。然后在任何地方使用该组件。没有主题,您将看不到任何东西。

1: Touch/Click Positions please provide minTouchHeight in class theme of DefaultListItemRenderer like:- 1:触摸/点击位置,请在DefaultListItemRenderer的类主题中提供minTouchHeight,例如:

        renderer.minWidth = this.gridSize;
        renderer.minHeight = this.gridSize;
        renderer.minTouchWidth = this.gridSize;
        renderer.minTouchHeight = this.gridSize;

2: Nothing, without Theme, 3: Resolution (Device Simulator) Problem 2:无,没有主题,3:分辨率(设备模拟器)问题

Follow the example given in feather library feathers-2.1.1\\themes\\MetalWorksMobileTheme\\source\\feathers\\themes 遵循羽毛库Feathers-2.1.1 \\ themes \\ MetalWorksMobileTheme \\ source \\ feathers \\ themes中给出的示例

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM