Live data from Hacker News

Android Development Tips For iOS Devs

stuartkhall.com

21–30 of 78 posts

Re: Android Development Tips For iOS Devs

#21
My experience with ListView was... weird. It doesn't ask you for a height for each row like UITableView does, just for a row count. Then, it measures your views as you return them. This meant that the scrollbar was completely unreliable, it would resize based on the height of the currently visible views. Is there an obvious way around this that I'm missing? ListAdapter doesn't have anything for specifying height.

Re: Android Development Tips For iOS Devs

#22
post #21

My experience with ListView was... weird. It doesn't ask you for a height for each row like UITableView does, just for a row count. Then, it measures your views as you return them. This meant that the scrollbar was completely unreliable, it would resize based on the height of the currently visible views. Is there an obvious way around this that I'm missing? ListAdapter doesn't have anything for specifying height.

Something like this[1] didn't work for you?

[1] http://stackoverflow.com/questions/15039913/android-how-to-m...

Re: Android Development Tips For iOS Devs

#24
An important correction: Unlike iOS, Android does not come with a simulator. It has an emulator. That explains many of the differences in startup speed and performance. A simulator runs natively and does not have to emulate the ARM machine code on your x86 device. The Android emulator is theoretically more accurate and runs the entire Android OS, but the cost penalty is huge. Therefore, most Android developers test small changes initially on a device.

http://programmers.stackexchange.com/questions/134746/whats-...

Re: Android Development Tips For iOS Devs

#25

An important correction: Unlike iOS, Android does not come with a simulator. It has an emulator. That explains many of the differences in startup speed and performance. A simulator runs natively and does not have to emulate the ARM machine code on your x86 device. The Android emulator is theoretically more accurate and runs the entire Android OS, but the cost penalty is huge. Therefore, most Android developers test s…

Excellent point. Running the x86 images in the emulator is much faster (and Google recently released x86 images w/ Google APIs in them).

Genymotion is a decent alternative to the 1st party emulator, it runs significantly faster.

Re: Android Development Tips For iOS Devs

#26
I recently went in the opposite direction (Android -> iOS). Forget all of the flame wars. If you know one, dabbling in the other is a great learning experience. The two platforms are running roughly the same hardware and facing roughly the same challenges, and the software architects at Google & Apple have chosen different ways to solve the problems.

Sometimes the patterns feel similar. You can rig up an iOS tableview/data source delegate/fetched results controller to look almost exactly like an Android listview/adapter/loader. But in other areas they function completely differently. It is well worth the time spent learning the other IDE and language. My Android app is better because of what I have learned in iOS and vice versa.

Re: Android Development Tips For iOS Devs

#27

An important correction: Unlike iOS, Android does not come with a simulator. It has an emulator. That explains many of the differences in startup speed and performance. A simulator runs natively and does not have to emulate the ARM machine code on your x86 device. The Android emulator is theoretically more accurate and runs the entire Android OS, but the cost penalty is huge. Therefore, most Android developers test s…

> Therefore, most Android developers test small changes initially on a device.

That's also because deploying an APK on a test device (or several devices) is way easier than deploying an IPA on an iOS device.

As someone relatively new to iOS this past month or so, I was shocked by the number of hoops I have to jump through just to take a piece of code I've written and put it on a device that I own and is sitting right next to me[0].

Coming from Android development, I never thought twice about this - it's easy to push the APK to my phone as part of the build process, and I don't even have to plug my device in to do so.

[0] Including shelling out $99 for a certificate that gives me the permission to do so.

Re: Android Development Tips For iOS Devs

#28

An important correction: Unlike iOS, Android does not come with a simulator. It has an emulator. That explains many of the differences in startup speed and performance. A simulator runs natively and does not have to emulate the ARM machine code on your x86 device. The Android emulator is theoretically more accurate and runs the entire Android OS, but the cost penalty is huge. Therefore, most Android developers test s…

> Therefore, most Android developers test small changes initially on a device. That's also because deploying an APK on a test device (or several devices) is way easier than deploying an IPA on an iOS device. As someone relatively new to iOS this past month or so, I was shocked by the number of hoops I have to jump through just to take a piece of code I've written and put it on a device that I own and is sitting right…

How is it easier than just pressing the build and run button on XCode?

Re: Android Development Tips For iOS Devs

#29
post #28

Earlier quoted context omitted.

> Therefore, most Android developers test small changes initially on a device. That's also because deploying an APK on a test device (or several devices) is way easier than deploying an IPA on an iOS device. As someone relatively new to iOS this past month or so, I was shocked by the number of hoops I have to jump through just to take a piece of code I've written and put it on a device that I own and is sitting right…

How is it easier than just pressing the build and run button on XCode?

I think the problem he is having is with how to get to that point. There is a lot of setup to get to the point of just being able to hit the build and run button in Xcode. Of course, once that work is out of the way it's super easy.

Re: Android Development Tips For iOS Devs

#30

An important correction: Unlike iOS, Android does not come with a simulator. It has an emulator. That explains many of the differences in startup speed and performance. A simulator runs natively and does not have to emulate the ARM machine code on your x86 device. The Android emulator is theoretically more accurate and runs the entire Android OS, but the cost penalty is huge. Therefore, most Android developers test s…

> Therefore, most Android developers test small changes initially on a device. That's also because deploying an APK on a test device (or several devices) is way easier than deploying an IPA on an iOS device. As someone relatively new to iOS this past month or so, I was shocked by the number of hoops I have to jump through just to take a piece of code I've written and put it on a device that I own and is sitting right…

I would argue that debugging is also infinitely easier in the Android world, since plugging a phone into USB and authorizing ADB gives you full control to see everything on the phone. You can get full logs and debug control over the hardware. You can push and pull stack traces and files to and from the device with a single, three operand command line and obtaining hardware screenshots requires only a click in IDE.

Android also has a plethora of debug options hidden in a special device settings menu that can be hugely helpful for troubleshooting performance issues.

Post reply on HN