java如何为Android的Flash Builder移动应用程序添加搜索栏?
我正在尝试将搜索/过滤功能添加到我的安卓应用程序中。我将提供一个屏幕截图和一份代码副本,以便您可以看到我在这里试图得到什么。我不知道什么是最好的方法来做这件事
`<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" title="iCalculate">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:layout>
<s:VerticalLayout paddingTop="10"/>
</s:layout>
<fx:Script>
<![CDATA[
import spark.components.Image;
import spark.components.ViewMenu;
import spark.events.IndexChangeEvent;
protected function calcList_changeHandler(event:IndexChangeEvent):void
{
// This method contains the selection assignments for the Calculator Views
if(calcList.selectedIndex == 0)//A1c Calculator
{
navigator.pushView(views.A1CCalculator);
}
else if (calcList.selectedIndex ==1)//BMI Calculator
{
navigator.pushView(views.BMI_Calculator);
}
else if (calcList.selectedIndex ==2)//GPA Calculator
{
navigator.pushView(views.GPA_Calculator);
}
else if (calcList.selectedIndex ==3)//TIP Calculator
{
navigator.pushView(views.TipCalculator);
}
}
]]>
</fx:Script>
<s:Label color="#1021C7" text="Welcome to iCalculate (4)" textAlign="center"
verticalAlign="middle" click="navigator.pushView(views.CompanyDetail)"/>
<s:List id="calcList" alternatingItemColors="[#e5e4e4,#ffffff]"
width="100%"
height="90%"
labelField="name"
change="calcList_changeHandler(event)">
<s:ArrayCollection>
<fx:Object name="A1c Calculator" />
<fx:Object name="BMI Calculator" />
<fx:Object name="GPA Calculator" />
<fx:Object name="Tip Calculator" />
</s:ArrayCollection>
</s:List>
<s:Label color="#1021C7" fontFamily="_typewriter" fontSize="10"
text="Powered by WATTS Professionals"/>
</s:View>
提前感谢你的帮助
瑞安
# 1 楼答案
根据您在图像中显示的内容,我不知道您为什么不能在当前布局中添加另一个“行”。概念上是这样的: