flex布局

[color=red]使用自定义Layout时,s:DataGroup和s:List应该如何选择?[/color]
与s:List相比,s:DataGroup没有selectedIndex,而且默认没有BackGround。

[color=red]Spark List不能响应Click事件吗?[/color]
是的,需要在ItemRenderer里响应,然后通过DispathEvent告诉Spark List。
参考链接:
[url]http://stackoverflow.com/questions/2299659/how-do-i-handle-click-event-in-spark-list-control-in-flex-4[/url]
或者你也可以响应change事件,在每次在change响应函数里处理完后,把Spark List的selectedIndex置为-1就可以了。

[color=red]如何设置Layout的间距?[/color]
s:TileLayout使用horizontalGap和verticalGap来设置。
s:HorizontalLayout和VerticalLayout使用gap来设置。

[color=red]如何使组件基于其container居中?[/color]
将组件的horizontalCenter和verticalCenter属性都设置为0。

[color=red]使用horizontalCenter和verticalCenter需要注意的地方[/color]
horizontalCenter和verticalCenter的优先级比x,y高。一旦设置horizontalCenter,则x会被忽略掉,设置了verticalCenter,则y会被忽略掉。再也无法通过修改x,y的值,改变组件的属性。

[color=red]horizontalCenter对left和right属性的影响[/color]
<mx:Button left="10" right="0" height="100%" horizontalCenter="0"/>
则此Button的布局将会是左边距为5,右边距也为5?
从而可知flex先根据left和right计算出宽度,然后再结合horizontalCenter调整布局。

[color=red]top=0,bottom=0,left=0,right=0 和 width=100% , height=100%有啥差别?[/color]
They both have the same effect in a BasicLayout. The only different might be in performance. In other layouts like VerticalLayout and HorizontalLayout I don't think the constraints (top, right, etc) have any effect, but the percentage values do.

参考链接:
http://stackoverflow.com/questions/4447274/whats-the-diff-between-setting-top-0-bottom-0-left-0-right-0-or-width-100-heig

[color=red]如何给Spark Scroller加child?[/color]
必须先为Scroller加上Group。
示例代码:

For AS:
var grp:Group = new Group();
grp.percentWidth = 100;
grp.percentHeight = 100;
grp.addElement( myChart );

var scroll:Scroller = new Scroller();
scroll.percentWidth = 100;
scroll.viewport = grp;

参考文章:[url]http://stackoverflow.com/questions/2287431/flex4-how-to-add-a-child-to-spark-scroller-in-as[/url]

For MXML:
<s:Scroller>
<s:Group>
<s:image source="c:/gameCover.png"/>
</s:Group>
</s:Scroller>


[color=red]在layout中的element上运用transform effects时,effect的applyChangesPostLayout的取值对layout有什么影响?[/color]
All transform effects define the applyChangesPostLayout property which, by default, is set to true for the 3D effects. This setting lets the 3D effect modify the target component, but the parent container ignores the changes and does not update its layout while the effect plays. Changes to other container children still cause a layout update.
参考链接:
[url]http://help.adobe.com/en_US/flex/using/WSF0D55C84-17E0-456a-A977-04BFE1E23BA8.html[/url]

[color=red]从3D layout切换到2D layout时,如何去掉已有的3D layout的位置属性?[/color]

var e:ILayoutElement = target.getElementAt( i );
// remove any 3D positioning
e.setLayoutMatrix( new Matrix(), false );


[color=red]rotation VS rotationX、rotationY, rotationZ[/color]
rotation用于2D,rotationX、rotationY, rotationZ用于3D。

[color=red]PerspectiveProejection的参考资料[/color]
3维旋转与透视变换(PerspectiveProjection)
[url]http://www.byywee.com/page/M0/S225/225570.html[/url]

[color=red]3D父容器是啥?[/color]
研究RotationX时看到的这个概念。
rotationX、rotationY, rotationZ的API解释如下:
[quote]rotationX : Number
指示 DisplayObject 实例相对于 3D 父容器距离其原始方向的 x 轴旋转(以度为单位)。
rotationY : Number
指示 DisplayObject 实例相对于 3D 父容器距离其原始方向的 y 轴旋转(以度为单位)。
rotationZ : Number
指示 DisplayObject 实例相对于 3D 父容器距离其原始方向的 z 轴旋转(以度为单位)。[/quote]
经过研究发现BorderContainer、UIComponnent默认情况下并不能做3D父容器,只有为其transform.perspectiveProjection设置了以后,它们才成了3D父容器。应该还有其他方法。
PS:在航空术语中,有关 y 轴的旋转称为偏航。有关 x 轴的旋转称为俯仰。有关 z 轴的旋转称为翻滚。

[color=red]UIComponent和BorderContainer中的is3D属性在什么情况下为true?[/color]
默认为false,它的API解释如下:
[quote]当元素为 3D 时,则为 true。元素也可以是 3D 的,因为它具有 3D 转换属性或 3D 布局后转换偏移,或二者都有。 [/quote]
为z属性设值,或者为其transform.matrix3D属性设置有意义的值后(new Matrix3D()不行)
is3D就会变为true。

[color=red]roation如何摆脱stage的影响。我的组件stageX坐标不同,旋转同样的角度,显示的样子不一样。怎样才能一样?[/color]


[color=red]layout可以拿到其container的实例吗?[/color]
<s:List>
<s:layout>
<local:CoverLayout/>
<s:layout/>
</s:List>
在CoverLayout的类里,能拿到s:List的实例吗?
内容概要:本文详细介绍了使用KGDB(Kernel GNU Debugger)调试Linux内核的方法及其重要性。文章首先强调了Linux内核作为系统核心的重要性及其调试的必要性,随后介绍了KGDB的基本原理和优势,包括其基于调试stub和GDB串行协议的工作机制。接着,文章详细描述了使用KGDB调试内核的具体步骤,包括准备工作、内核配置、设置启动参数、建立调试连接和进行调试操作。文中还通过一个实战案例展示了KGDB在解决实际问题中的应用,并总结了使用KGDB时的注意事项和常见问题的解决方法。最后,文章展望了KGDB未来的发展方向和应用场景,如优化调试性能、支持新型硬件架构以及在嵌入式系统、云计算和大数据领域的应用。 适合人群:具备一定Linux系统开发经验的研发人员,尤其是那些需要调试和优化Linux内核的工程师。 使用场景及目标:①帮助开发者深入了解Linux内核的运行状态,精准定位并修复内核问题;②优化内核性能,提高系统的稳定性和可靠性;③适用于嵌入式系统开发、远程服务器维护等场景,特别是在硬件资源有限或无法直接接触设备的情况下。 其他说明:在使用KGDB进行调试时,需特别注意串口设置的一致性、内核版本的兼容性以及调试信息的完整性。同时,要解决常见的连接失败、断点无效等问题,确保调试过程顺利进行。未来,KGDB有望在技术上不断优化,并拓展到更多应用场景中,为Linux系统的持续发展提供支持。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值