首页 > 代码库 > 利用RemoveAllView实现切换窗口
利用RemoveAllView实现切换窗口
#Region Project Attributes #ApplicationLabel: SwitchingWindow #VersionCode: 20140615 #VersionName: ‘SupportedOrientations possible values: unspecified, landscape or portrait. #SupportedOrientations: unspecified #CanInstallToExternalStorage: False#End Region#Region Activity Attributes #FullScreen: False #IncludeTitle: True#End RegionSub Process_Globals ‘These global variables will be declared once when the application starts. ‘These variables can be accessed from all modules.End SubSub Globals ‘These global variables will be redeclared each time the activity is created. ‘These variables can only be accessed from this module. Private Button1 As Button Private Button2 As ButtonEnd SubSub Activity_Create(FirstTime As Boolean) ‘Do not forget to load the layout file created with the visual designer. For example: ‘Activity.LoadLayout("Layout1") Activity.LoadLayout("1") ‘ 加载布局文件(BAL),返回已加载的布局的LayoutValues??End SubSub Activity_ResumeEnd SubSub Activity_Pause (UserClosed As Boolean)End SubSub Button1_Click Dim i As LayoutValues Activity.RemoveAllViews ‘ 移除全部试图 i = Activity.LoadLayout("2") Log("button1 " & i) ‘ button1 320 x 480, scale = 1.0 (160 dpi)End SubSub Button2_Click Dim i As LayoutValues Activity.RemoveAllViews ‘ 移除全部试图 i = Activity.LoadLayout("1") Log("button2 " & i) ‘ button2 320 x 480, scale = 1.0 (160 dpi)End Sub
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。