我正在使用带有SDK 5.4.0GA的Appcelerator Studio 4.7.
我想使用滑动后退手势返回到上一个视图控制器,但是ScrollableView即使我在屏幕的左边缘开始我的手势,我的触摸也会移动视图.如果没有结束,滑动后退手势可以正常工作ScrollableView.
当我使用Titanium Studio 3.4时,一切都很好.目前无法使用它,因为它不受支持,您甚至无法登录.
这个问题是因为Appcelerator Studio,而不是因为SDK版本.我尝试使用具有相同SDK版本的Titanium Studio和Appcelerator Studio,并且只有Appcelerator Studio出现此问题.这就是我一年前坚持使用Titanium Studio的原因,但现在却不可能.
以下是没有解决方案的相关主题:https://archive.appcelerator.com/topic/581/swipe-right-from-the-edge-to-go-back-to-the-previous-window-doesn-t-工作了合IOS-使用-SDK-3-5-1-GA-和-4-0-0-GA/4
编辑.如何在2分钟内重现它:
1)文件 - >新建 - >移动应用项目 - >默认合金项目
2)添加名为scrollable的新控制器
scrollable.xml:
<Alloy>
<Window class="container">
<ScrollableView>
<ScrollView>
<View height="5000" backgroundColor="#DBD6D6">
<Label top="20">View1</Label>
</View>
</ScrollView>
<ScrollView>
<View height="5000" backgroundColor="#FED2FB">
<Label top="20">View2</Label>
</View>
</ScrollView>
<ScrollView>
<View height="5000" backgroundColor="#DCEFD7">
<Label top="20">View3</Label>
</View>
</ScrollView>
</ScrollableView>
</Window>
</Alloy>
Run Code Online (Sandbox Code Playgroud)
index.js:
function doClick(e) {
var scrollableController = Alloy.createController('scrollable',{
});
var view = scrollableController.getView();
$.index.openWindow(view);
}
$.index.open();
Run Code Online (Sandbox Code Playgroud)
INDEX.XML: …
titanium appcelerator ios appcelerator-titanium appcelerator-alloy
我正在尝试在 ios 上的模拟器上运行在titinium.js 中构建的应用程序,但出现以下错误。
[INFO] : Writing index.json with listing of JS/JSON files
[INFO] : Invoking xcodebuild
[INFO] : Finished building the application in 25s 110ms
[INFO] : Launching iOS Simulator
Run Code Online (Sandbox Code Playgroud)
[错误]:模拟器不可用
应用程序未在 8.0.0.GA 模拟器中打开,但在 8.1.* 中打开,但某些功能不起作用
以前它在模拟器中工作。
这是环境的详细信息
DesignBees-MacBook-Pro:~ designbee$ appc 信息
Appcelerator Command-Line Interface, version 7.1.1
Copyright (c) 2014-2019, Appcelerator, Inc. All Rights Reserved.
Operating System
Name = Mac OS X
Version = 10.14.6
Architecture = 64bit
# CPUs = 8
Memory = 16.0GB
Node.js
Node.js Version = …Run Code Online (Sandbox Code Playgroud) 以下填充整个屏幕:
<View height="Ti.UI.FILL" width="Ti.UI.FILL">...</View>
Run Code Online (Sandbox Code Playgroud)
fill属性在这里描述:http://docs.appcelerator.com/platform/latest/#!/ api/Titanium.UI- property- FILL
但是你也可以使用以下方法做同样的事情:
<View height="100%" width="100%">...</View>
Run Code Online (Sandbox Code Playgroud)
因此我的问题是,有什么区别?
titanium appcelerator titanium-alloy appcelerator-titanium appcelerator-alloy
在Titanium中,我知道可以在浏览器中打开URL,如下所示:
Ti.Platform.openURL("http://example.com/foo");
Run Code Online (Sandbox Code Playgroud)
但是这会在这样的浏览器中打开它:
与Slack等其他iOS应用相比,它看起来像这样:
正如您在顶部看到的那样,它有一个完成按钮,无法更改网址.还可以选择在Safari上打开它.
在Facebook Messenger iOS应用程序上打开它,它看起来像这样:
如何更改Titanium在iOS上打开URL的方式,以便它使用类似于Slack中使用的浏览器.
titanium appcelerator ios appcelerator-titanium appcelerator-alloy
在相当多的Android应用程序(例如Stack Exchange,Slack)中,当您打开链接时,它会显示在浏览器中,但作为应用程序的一部分(即不在Google Chrome浏览器或WebView上).
例如:
在Stack Exchange Android App上打开链接时
在Slack Android App上打开链接时
请注意,两者看起来非常相似,因此它向我表明Android具有某种功能(例如适用于iOS的SafariDialog).不仅仅是WebView.
如何在Android上为Titanium应用程序执行此操作.
titanium appcelerator titanium-alloy appcelerator-titanium appcelerator-alloy
我即将使用appcelerator钛框架测试应用程序,我必须在屏幕上居中显示:
我的index.xml:
<Alloy>
<!-- Anddroid Window -->
<Window id="index" platform="android">
<Require type="view" id="firstscreen" src="firstscreen"/>
</Window>
<!-- iOS Window -->
<NavigationWindow id="nav" platform="ios">
<Window id="win1" backgroundColor="white">
<Require type="view" id="firstscreen" src="firstscreen"/>
</Window>
</NavigationWindow>
Run Code Online (Sandbox Code Playgroud)
第一个屏幕xml:
<Alloy>
<ScrollView scrollingEnabled="false" contentWidth="Ti.UI.FILL">
<ImageView class="fullBgImage" image="/images/login/bg2.png" />
<View layout="vertical">
<View id="loginView" class="heightAuto" layout="vertical">
<ImageView id="localImage" image="/images/logo.png" />
<Label class="logoLabel" text="Karma" />
<Label class="logoSlogan" text="Faits confiance à votre Karma pour booster votre carrière" />
<View class="btn btnVert" onClick="openCandidat"><Label class="btnLabel" text="Je recherche un job" /></View>
<View class="btn btnBlanc" ><Label …Run Code Online (Sandbox Code Playgroud)appcelerator appcelerator-mobile appcelerator-titanium appcelerator-alloy
如何在 Android 上将 Picker Row 标题从黑色更改为白色?我尝试使用 TSS 和带有属性的 XML,但没有成功。
XML
<Alloy>
<View top="80" height="70">
<Label class="calendarViewDayDay" top="5" left="10" color="#FFFFFF" text="L('Rooms')"></Label>
<Picker id="Numberpicker2" top="20" left="10">
<PickerColumn>
<PickerRow title="1" />
<PickerRow title="2" />
<PickerRow title="3" />
<PickerRow title="4" />
<PickerRow title="5" />
<PickerRow title="6" />
<PickerRow title="7" />
<PickerRow title="8" />
<PickerRow title="9" />
<PickerRow title="10" />
</PickerColumn>
</Picker>
</View>
</Alloy>
Run Code Online (Sandbox Code Playgroud) javascript titanium appcelerator appcelerator-titanium appcelerator-alloy
我使用 Appcelerator Studio/Titanium 创建了一个应用程序,最初仅适用于 iOS,我将所有图像直接放入资产文件夹中;app/assets. 所有图像在 iOS 上都可以正常加载,例如:
<ImageView id="logo" image="logoHorizontalWhite.png" />
Run Code Online (Sandbox Code Playgroud)
但是,当我为 Android 构建应用程序时,图像没有显示。
这是否意味着我必须将图像放入 Android 特定目录中,并且我需要为 iOS 和 Android 拥有所有图像的副本?
titanium appcelerator titanium-alloy appcelerator-titanium appcelerator-alloy