Community Questions & Answers
Change page between two pages
Hi, My project structure is: ~~~ - controllers - order - home Category.coffee Home.coffee Index.coffee - styles - order - home Category.coffee Home.coffee Index.coffee - views - order -...
how to access custom row(s) data via Alloy ?
hi, ive tried many/multiple ways to get this to work but just cant as yet, so would appreciate anyone's assistance. i have a view as follows : ~~~ "LBProw.xml" <Alloy> <TableViewRow id="LBProw" > <ScrollableView...
Access to $.index in other views
Hi, I can't access to $.Index in my other views this is my project structure: ~~~ - controllers - order - home Category.coffee Home.coffee Index.coffee - styles - order - home Category.coffee ...
Change View Background Selected Color On Click Event of a image
I am making a application where i need to change the background selected color on click event of a buttonmy code is as follows but it's not working help me.. var likeView =...
Improve performance when animating complex views
Hi, i asked something similar a while ago but still have no satisfying solution. The current state is: I have, at least, two complex views (each has 10 Subviews, 1 ScrollableView, 50 Labels) and two animations (one for every view) running "in...
Alloy view xml attribute : ns
I have read "ns" in the example of Alloy mapping. What does it mean? here is the code. ("ns" is in line 2.) ~~~ <Alloy> <View ns="Ti.Map" id="map" mapType="Ti.Map.STANDARD_TYPE"> ...
How to get rowData from custom TableViewRow?
hey guys, i've created a custom tableviewrow and the output is great, but not i want to get the information of my custom rowData, but i've no idea how to catch it. i tried several variants of using `e.rowData` but i always get no usable result. could...
toImage no working
I have tried the function toImage on android it doesn't work when I store the ~~~ var image = Ti.UI.createImageView({image: "path.png"}); var img = image.ToImage(); var toDisplay = Ti.UI.createImageView({image:...
how to add an image from k.js to p.xml from in alloy mobile app
hi friends i am new to develop an in alloy mobile application in titanium studio i had an issue like i want to add an view from k.js to p.xml in my application so plzzzzzzzzzzz help me
removeAllChildren not working on View
Using SDK 3.1.0GA on OSX with xcode 4.6.2 for iOS. removeAllChildren works on a scrollView, but no on a plain View. however, calling remove(child) works just fine. is this something weird with my setup or others noticed too?
How do I add a ti.paint PaintView in Alloy?
I've tried the below but am getting an error: 'Couldn't find variable: ti at index.js' Controller: ~~~ var paint = require('ti.paint'); ~~~ View: ~~~ <Alloy> <Window> <PaintView ns="ti.paint"...
How to just put two buttons in window with Alloy?
~~~ <Alloy> <Window class="container"> <Button id="button1" onClick="startA">Start A</Button> <Button id="button2" onClick="startB">Start bla bla...
Too many views? Failed adding to JNI local ref table (has 512 entries)
I'm developing a podcast client and recently switched from plain Titanium (where I didn't have that problem) to Alloy and using a widget as my cover image (view with backgroundimage, view with label). The problem is that I'm going to have lots of cover...
How do I rearrange children in a view hierarchy?
I need to set the child at position 3 to a widget after a user clicks on a button but I noticed that the View class @ http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.View only allows "read only" access. I don't need to remove the...
Android view backgroundImage not displaying
Is there anything special I need to do to show Android background images? my code, this is no brainer stuff, but isnt working for some reason, i even went to using the Ti.Filesystem ~~~ var tableView =...
Android Soft Keyboard Pushing Controls Up
I can't seem to figure out why the appearance of the soft keyboard whilst editing a text field on Android causes some of my controls to get pushed up the page. Is there a way to stop a view or a button from being moved up? It makes a real mess!
Android - 9patch image as View backgroundImage not scaling properly
I have a 9patch image which scales nicely as the _backgroundImage_ of a button. When I take this same image and apply it as the _backgroundImage_ of a _View_, it does not scale intelligently - just stretches the whole image. The same thing happens when...
pinch event and zoom on a simple view
Hi, how can i implement zoom on a simple view at the pinch event? thanks in advice
TableViewRow overlaps a containing view on tap
I have got a bunch of table rows being created like this: ~~~ var row = Ti.UI.createTableViewRow({ backgroundColor: '#fff', selectedBackgroundColor: '#ddd', height: '40dip', hasChild: hasChild, hiddenText: title }); var rowLabel =...
Alloy ddding view to window with/without animation
Been wasting my day trying to do one of the most basic things ever. I'm trying to add a view that will popup over an certain area of my window (body). The window starts with a grid menu from a widget and i want to create a view that will come over that...
Alloy confusion over Windows and Views
Hello, I have just started using Titanium Studio (3.1.0.201304151600). I'm looking to build a mobile app for android (4.2.2) using alloy. Running windows 7. I'm a bit confused over the views and windows on the xml files. I would like my app to have...
View is displaced after focusing a window
Sometimes the tableview displaces itself from the origin position (left: 0), after the main window is opened for the first time or gain focus (e.g. popping the child window). The tableview moves to the left till the right edge moves to the half of the...
What is fireEvent? How do I use it?
Hi guys, I do not understand how to use fireEvent aside from `Titanium.App.fireEvent('someEvent')`. The docs show fireEvent as a method in most (if not all) modules. I tried to do this and I got an error. If fireEvent is called inside another event...
How to swap pages (js files) out of a view without keeping them in memory
First, some background: This is my first week in titanium and I'm having trouble forming a mental model for how to structure content. I have a nice table-view menu that I want to use to control all the navigation in my app. It's a sliding menu that comes...
How to increase performances of rendering views
Hello, I'm working on an iPhone and Android application. In my application I use a lot of big views with many nested elements and the rendering time is too long. My views are build with horizontal and/or vertical layout. Any tips or best practices to...
Diagonal line between two points
Hi everyone, how can i draw a line between two points? thank you so much
Issues animating just created Views.
Hello! I'm trying to do a transition between two views. I want to animate both views, I have no issues when trying to animate the current existing view. But when I try to animate the one I just created programmatically. It doesn't work, it just skip the...
build android mobile application suitable for all screen resolutions
Hi ALL <br> how can i build android mobile application suitable for all screen resolutions using titanium?<br> so how to make background image size for example changes to fit screen resolution,<br> note that i test my application on HVGA...
Issues in Using Class Styles with Alloy in Latest Alloy Update
Hi all- Has anyone seen issues in the latest update to the Alloy framework (released the week of April 22, 2013) in using classes within tss files? I use classes extensively to style my application, and upon upgrading my framework, I noticed that my...
Two require tags in views break Alloy
~~~ <Require src="foo"> <Require src="foo"> ~~~ This breaks Alloy. The page will stop rendering after the fire Require statement. Is this a known bug?
How to prevent vertical bounce in a horizontal scrollview?
Hi all, I'm facing a rather peculiar problem and I hope someone can help me out here. I have a scrollview within which I have some views that are scrollable horizontally. Since I require these views and the scrollview to resize within the page based on...
How can I draw a line?
I find it very hard to believe that there's no simple way to draw a line using Appcelerator. It seems very common among iOS apps (I'm making an iPad app). I want the user to be able to touchmove over a view and have a line appear where they have drawn. My...
Can't AirPrint a view converted to an image?
I am trying to print a view I have converted to an image with the toImage method. I have successfully used this method to get an email-able image. So, following some advice found here, I tried doing the same and saving the image and printing it: ...
Picker view animation failed
Hi guys, I've a window wit two views, and I call both from each other with a transition (animationstyle.curlap). On the first view there is a picker view with an animation (slide in e slide out) that is fired by a button. if I don't use a transition...
Change one View from another View in Alloy
Hi everybody! I am in a bit of a hurdle understanding some fundamentals of how Views work I guess. To get my app more organized I tried to make use of <Require type="view" src="foo"/> in my index.xml. Now my index.xml looks like...
How to make smooth animations on Android
The real question here is how can we improve the actual animations for android, when we build iOS apps, we can do beauty ones, very smooth and cool even with ease, but then when we run our apps on android it looks very strange, not even close to smooth and...
Shadow outside the window
Hello! I have an app, which provides Facebook-like sliding menu beneath the windows. When the user clicks the button, the frontmost window slides right, and reveals the menu. While it is slided, it had a shadow (a transparent png in a view on negative...
width problem on android
Hi, I'm developing for i phone and android using sdk 3.0. I have a problem with the width of some view: i created a kind of custom nav bar with 4 views here is the code : ~~~ var topContainer = Ti.UI.createView({ layout : 'horizontal', top :...
Drag and drop (child views)
Hello everyone, First of all I know that there are a lot of topics about this, but I've been searching for 2 full days but nothing seems to work out for me. Here's the situation. I created a window with a view, which is my Grid. By pressing some buttons I...
Alloy XML Views - Passing Through Parents' Arguments to Widget as an Attribute Argument
Is it possible to pass through arguments that were passed to a view from within the XML view to a widget? ~~~ <Widget id="test" src="SomeWidget" args="arguments" /> ~~~ Would be parsed by Alloy...
view.toImage() is not working in android
Application Type : Mobile Titanium SDK : 3.0.0,3.0.2,3.1.0 Hi I want to capture a view. Means my view have some subviews and they have different images and I want to capture the whole view so I can get the one image which have all subview's images. I am...
is it possible use data bindings in ??a Widget?
Hello I have a window that uses a data model for building. I have no problems in using a model and its attributes to fill the content, but when i want to use the data binding a custom **widget**, the attributes are not considered Here is the windows when...
Grid view is Possible or not?
Is there is any method is available to create grid view in titanium?
Retrieving an Alloy View for a Flip Animation
Hi there- I am applying a simple FLIP_FROM_LEFT animation when a user clicks a button to switch between two views. Here is the issue. The first rotation works without an issue. I simply create a controller and do a getView for the view I am animating...
View show/display event
Hi, I'm trying to load data only when a view is shown vs loading the data in advance. The focus event doesn't seem to work for me. Is there something I am missing? Thanks
Access Functions/Variable within a Controller from another Controller
This same question was essentially asked [here][someid], but I do not believe it was fully answered. I have a MasterView (alloy xml & controller) that holds multiple instances of a SubView (separate alloy xml & controller). However, there are...
lenght view
Titanium I can ask if there is more than one element? .... I have a view that is added on a window, and this view is in a function that has a setInterval (), but I need to know how often adds that element view a window. my code ~~~ var protector =...
Dynamically Updating Content to an Existing View - What's the Best Practice?
I am trying to build an app that has different areas of content. I have successfully created a navigation menu that they can click to toggle back and forth between screens. Now, the question is what would be the best practice to load content dynamically...
Disable ListView scroll
Is there a way to disable listview scroll both on iOS and Android? Using tableviews it would be scrollabe=false; ps: I know I can add a view on top of that with opacity 0, but this would remove the listener from the items also, and it's pretty bad to do.
dynamic data for each TableViewRow
I'm using alloy (markup and models) to construct a tableview, Everything works perfect ~~~ <Collection src="spot" /> <Window> <TableView id="spotTableView" dataCollection="spot"> ...