Generic solution for Picker

You must Login before you can answer or comment on any questions.

I am currently stock on this:

The way the picker behaves on android/iPhone is totally diff and I am force to redesign the UI and still no solution that would atleast comes close to having my apps look-a-like on both platform...

does any one knows a generic solution for the picker that would look close on each platform?

Thanks

— asked 2 years ago by Peter Eman Abastillas
2 Comments
  • Could you also give an explenation on how the picker behaves on both? And how you want it to behave?

    Also its not that big of a deal if the picker looks different on iPhone and Android.

    — commented 2 years ago by Kami -

  • everything will look a bit different if you use native components on two different platforms.

    — commented 2 years ago by Alberto Marcone

3 Answers

Accepted Answer

Peter

You will never get the UI for both platforms looking the same. If you did, you would probably alienate the users on both, as they each expect a specific look and feel.

"Cross-platform" with Titanium does not mean identical apps for all platforms but, rather, a consistent programming language, a single API, a single codebase, a single model, identical business logic, identical (or almost identical) controller logic and common assets.

I hope this clarifies it.

I suspect you are wanting both controls to look somewhat similar. Luckily the picker control contains a property "useSpinner" which if you set to true will cause Android to display a control that looks more similar to the iOS one. I warn you it is not a native Android control....so your users may not be used to seeing it that way, but it should make the pickers seem more similar on both platforms.

Note that iOS makes the columns fill up the entire screen width, whereas the useSpinner on Android makes the columns as thin as possible. You can adjust the width on the individual columns (not the picker as a whole) to simulate the same display.

yes I think Paul had a point there, am an android user but "I think" titanium is maybe bias with iOS compare to android in terms of implementation, I just had my mac and developed iPhone apps with ease and more likely complete UI helpers...

in Android I was kinda been looking back and forth for some UI implementations and notice some memory leaks on the process...

@Mike yes I want to try that... I successfully implemented a createNavigationGroup on iPhone and was hoping to replicate that on android using createScrollableView then I notice a lot of unfreed memory that cause my table (bunch of data that reaches around 500 rows) to "force closed"

I think the best solution here is to always use

if (Ti.Platform.osname==="android") {
 
} else {
 
}
thanks guys...

— answered 2 years ago by Peter Eman Abastillas
answer permalink
2 Comments
  • 500 rows is kind of huge, there are some ways to avoid having that much in a tableview... unless you simply display unformatted text, without any layout...

    — commented 2 years ago by Benoit Blais

  • can you limit your song list to anything less than that (mine has more than 900)? or your contacts (mine has more than 600 including gmail sync)? let along the messages on my SMS (sometimes my limit is around 300) this are all formated with layout.....

    — commented 2 years ago by Peter Eman Abastillas

Your Answer

Think you can help? Login to answer this question!