titanium-alloy

Confused about working with nested models in Titanium Alloy

空扰寡人 提交于 2019-12-25 07:08:52
问题 The goal is simple. My app has a messaging component. The way I'm planning on structuring it is by having a Conversation model, which has some attributes (subject, start date, uID), and each Conversation will contain many Message models. Conceptually what I'm trying to do seems pretty trivial: have a Collection of Conversations bound to a TableView. When a table view is clicked, the nested messages get bound to a new Window. I'm struggling with how to do this via Backbone. I have experience

Disable autoscroll top on insertRowBefore in a TableView in Appcelerator/Titanium

梦想的初衷 提交于 2019-12-25 02:26:36
问题 i'm currently using a TableView to display some elements in Appcelerator/Titanium. The problem that i have is that when i make a pull to refresh and i call the method " insertRowBefore " to insert new elements at the beginning of the table using the method like following: $.table.insertRowBefore(0,row); The table auto scrolls to top, and it looks a little bit bad when there're a lot rows to insert, i want to keep the current position. Any ideas? 回答1: I have had the same problem it looks very

How to reload the tab in tab group in titanium alloy

人盡茶涼 提交于 2019-12-25 01:15:16
问题 I have three tabs in my tab group. One tab is for change language. If user changes the language I should need to change the selected language for all the tabs. my tab group code is as follows, <Alloy> <TabGroup id="myTabGrp"> //Tabgroup Added <Tab id="one"> <Window class="container"> <Label>This is the Home View</Label> </Window> </Tab> <Tab id="two"> <Window class="container" id="winTwo"> <Label>This is the second View</Label> </Window> </Tab> <Tab id="three"> <Window class="container">

Issue with displaying the radio button label in tianium?

别说谁变了你拦得住时间么 提交于 2019-12-24 12:23:55
问题 I have created a radio button from the following link, https://github.com/yozef/TiRadioButtonGroup. I am able to see the radio buttons but the respective radio button labels are not showing. How can we display the radio button labels. My code: View: <Alloy> <Window class="container"> <View id="radiopicker" ></View> </Window> </Alloy> Style: ".container": { backgroundColor:"red", layout: 'vertical' } "#radiopicker": { width: '90%', top: '25dp' } Controller: (function() { var radioButton =

How to import a widget in alloy titanium

蹲街弑〆低调 提交于 2019-12-23 03:04:33
问题 Newbie question here: I'm fiddling around with titanium studio with alloy mvc and starting to get the hang of it. It's just not clear to me how I can import a widget into my project. I found a nice slider menu and want to use this in my own project. Now the docs say you have to add a dependency in the config.json like so: "dependencies": { "com.slider" : "1.0" } and then you'd be able to use it in your view: <Widget src="com.slider"></Widget> But don't I need to import it into my project

Titanium Alloy Push Notifications - passing function as callback to be called inside event listener

梦想的初衷 提交于 2019-12-23 01:57:06
问题 I have set up a module for dealing with Push-Notifications which has this: //myPush module var CloudPush = require('ti.cloudpush'); ... var setAppPushNotifications = function(cback) { // Process incoming push notifications log('cback=' + typeof cback); //log is a wrapper to Ti.API.info CloudPush.addEventListener('callback', function (evt,cback) { log('Inside CloudPush-Callback.'); log('cback=' + typeof cback); getIncomingNotification(evt, cback); }); }; var getIncomingNotification = function

how to change hintText color in textField Titanium?

流过昼夜 提交于 2019-12-22 13:56:22
问题 this is my code,and I want to change the hintText Color, how to do? "#email":{ width: '70%', left:'13%', font:{ fontSize:'20sp' }, color: '#fff', hintText:'请输入手机号', borderColor:'transparent', bottom:'2%', //backgroundColor:'#d9d9d9', backgroundColor:'transparent', borderStyle:Ti.UI.INPUT_BORDERSTYLE_ROUNDED } 回答1: actually you can't i tried before here what i did to change the hint color and font you need to create a view , textfeild and label with adding change listener on textfeild to show

Android Build Error: Unable to locate Java VM. Please set JAVA_HOME environment variable

夙愿已清 提交于 2019-12-13 05:29:46
问题 I'm using Ti Studio on Win7, and my project builds and works when I have my Android plugged in via USB and I run using "Android Device". However, when I try to buid it for distribution I get: [ERROR] Program launch failed. Unable to locate Java VM. Please set JAVA_HOME environment variable. I have looked at this thread which describes a similar problem, and verified that JAVA_HOME is set: +>echo %JAVA_HOME% C:\Program Files\Java\jdk1.6.0_29 Also, in Ti Studio I have verified that Preferences-

Filtering a collection in Titanium Alloy

你离开我真会死。 提交于 2019-12-13 05:22:15
问题 From one controller (Convos) I fire up a Messages controller. I pass in an id, and am trying to use that id to filter which Messages are bound to the new view. For some reason, the filtering is not working, and all Message records are being shown. Here's the code in my Messages controller. Data structure for the Messages model message_id: "integer", convo_id: "integer", created: "text", author: "text", body: "text", Convos.js var messages = Alloy.createController('messages', { convoId: e

Cannot get module to work in Titanium Alloy JS

六眼飞鱼酱① 提交于 2019-12-13 01:09:37
问题 I've tried to add the TiSocial.Framework module into Titanium Alloy, and after reading several guides and questions, I still can't get it to work. What am I doing wrong? Here are the steps I took: Copied the unzipped module files into modules/iphone/TiSocial.Framework-master Edited the TiApp.xml file with: <module platform="iphone">TiSocial.Framework-master</module> Cleaned the build tried to run the app. But I get the following error(s): Could not find Titanium module id=TiSocial.Framework