appcelerator-mobile

how to update global variable in titanium?

丶灬走出姿态 提交于 2019-12-12 02:37:44
问题 i'm having some problem in updating my array which is global by the way. here is my code: Ti.App.dinercolor=["#FF5A00","#007EFF","#dccdc0","#C2FF95","#A700FD","#dccdc0","#dccdc0","#5F9EA0","#dccdc0","#dccdc0","#22A000","#DCCDC0","#dccdc0","#FF003C","#dccdc0","#FF003C","#dccdc0","#22A000","#dccdc0","#FFF191"]; thats my global array which i can access data from it from anywhere in the application. the problem comes when i want to update the array like: for(var q=0; q<Ti.App.dinercolor.length; q

Update password field from Titanium application

☆樱花仙子☆ 提交于 2019-12-12 01:32:41
问题 I'm working on a Titanium based iOS application. In which I need to implement the password reset functionality within my app. I found this requestResetPassword method for doing this: Cloud.Users.requestResetPassword({ email: 'me@mycompany.com' }, function (e) { if (e.success) { alert('Success: Reset Request Sent'); } else { alert('Error:\\n' + ((e.error && e.message) || JSON.stringify(e))); } }); From docs it says that, it'll send a reset password option to user's mail account. But I don't

how to redirect from one page to tab in another page in titanium?

落花浮王杯 提交于 2019-12-11 23:14:46
问题 I have two pages in my application. The first page has a tab group with three tabs. Now on click of button in second page, I need to redirect my control to first tab 2 in my first page. How can I do that. My 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=

Disable the default actionbar on titanium sdk 3.5.0GA

百般思念 提交于 2019-12-11 19:33:11
问题 I updated my Titanium sdk to 3.5.0GA, but there exits a default action bar on every window on Android. Can anyone please tell me how to permanently disable this default action bar? Thanks in advance. 回答1: Define the settings for your custom theme, for example, your theme at /platform/android/res/values/customtheme.xml like < ?xml version="1.0" encoding="utf-8"?> <resources> <style name="Theme.NoActionBar" parent="@style/Theme.AppCompat"> <item name="windowActionBar">false</item> <item name=

i am unable to apply “Theme.AppCompat.NoTitleBar” and “colorPrimaryDark” status bar color property at the same time

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 17:42:44
问题 I want to hide the action bar throughout the application and also want to set the status bar color? in Appcelerator titanium. 回答1: Please follow the official guide at https://wiki.appcelerator.org/display/guides2/Android+Action+Bar You can either hide it in code win.activity.actionBar.hide(); in the open event and use a normal style in the theme xml or you set your parent in the theme to <style name="Theme.MyTheme" parent="Theme.AppCompat.NoTitleBar"> . Statusbar color is a theme item: <item

Setting Minimum iOS Version number in Titanium Studio

冷暖自知 提交于 2019-12-11 14:54:07
问题 How can we set minimum iOS version in Appcelerator Titanium Studio from default 4.3 ? 回答1: Add following setting to the tiapp.xml . Make sure to change 6.1 to whatever minimum iOS version you want to build your app for. <ios> <min-ios-ver>6.1</min-ios-ver> </ios> builder.py looks at this value to decide what minimum version to build the project with. You can find builder.py at following location: ~/Library/Application Support/Titanium/mobilesdk/osx/<Titanium-SDK-Version>/iphone/builder.py Don

View is not updating from other controller Appcelerator Alloy

半腔热情 提交于 2019-12-11 13:31:47
问题 I hope you will be fine. I am having trouble updating views in Titanium Appcelerator Alloy, I basically want to be able delete previous children from picker and then add new one in picker that is in a different controller/view that i am currently in..... I have followed this THIS SOLUTION unfortunately that is not working for me. Here is the code I am trying. createEvent.js Ti.App.addEventListener('db_update', function(){ alert("OK"); $.picker.removeAllChildren(); }) customParty.js $.btnclick

Track App Version in Google Analytics

瘦欲@ 提交于 2019-12-11 12:47:23
问题 I am using Google Analytics module( https://marketplace.appcelerator.com/apps/5081?2014113336 ) in my Titanium App. 1). Is there any way to track my app version to Google Analytics. In that module documentation no information regarding this. 2). How can I test Google Analytics in my app? After integrating GA, I didn't see any data on my GA account. (even realtime data also empty https://www.google.com/analytics/web/#realtime ) 3). When creating new Account in Google Analytics, which one

Android app hangs on restart (Appcelerator Titanium)

梦想与她 提交于 2019-12-11 08:02:07
问题 I am making an app for Android. I encountered strange issue. Application works perfectly until it is closed with back button. If so, than after restart it is showing splash screen and becoming non-responsive. After some time dialog (if I want to close the app) may show. It happens with any code. For example: var myApp = {}; alert(1); alert(2); If app is closed in hard way (third button and swiping app out) than everything is fine. Problem occurs on every Android version both on device and

How to Call a WebService in titanium using javascript

本秂侑毒 提交于 2019-12-09 13:29:30
问题 I am new to titanium and and want to call a web service from my titanium app. The webService returns the json response. As I am aware of calling the webService using XMLRPC but very confused regarding json. Until now, I know that we have to create the HTTPClient . var request = Titanium.Network.createHTTPClient(); request.open("POST", "http://test.com/services/json"); request.onload = function() { var content = JSON.parse(this.responseText);//in the content i have the response data }; request