Live data from Hacker News

Ask HN: Am I crazy or is Android development awful?

news.ycombinator.com

101–110 of 157 posts

Re: Ask HN: Am I crazy or is Android development awful?

#101
post #90

Earlier quoted context omitted.

The actual layout algorithm is handled by DynamicLayout, not the textView. It really is just supposed to show some text. You can see it here.[0] Almost all the difficult aspects of showing the text, such as alignment, text direction, line spacing, line breaking, ect. as well as the actual rendering of the text are handled by StaticLayout/DynamicLayout. All TextView should be doing is basically just allowing you to ad…

> I have actually made my own TextView using just layout so I don't think this comment is warranted. Make sure you handle the following attributes and how they affect each other! > text, bufferType, hint, textColor, textColorHighlight, textColorHint, textAppearance, textColorLink, textFontWeight, textSize, textScaleX, fontFamily, typeface, textStyle, cursorVisible, maxLines, maxHeight, lines, height, minLines, minHei…

>textSelectHandleLeft, textSelectHandleRight

Done

>textColor, typeface, textColorLink, textFontWeight, textStyle

handled by TextPaint in StaticLayout/DynamicLayout. For example textColorLink is just `linkColor` from TextPaint.[0]

>text, textSize, maxLines, justificationMode, breakStrategy, hyphenationFrequency, lineBreakStyle

handled by StaticLayout/DynamicLayout

>shadowColor, shadowDx, shadowDy, shadowRadius

mTextPaint.setShadowLayer(radius, dx, dy, color);

Wow, that was so difficult. Only those that "know about UI" must be capable of such a feat?

>numeric, digits, phoneNumber, inputMethod, editable, cursorVisible, textCursorDrawable, allowUndo, inputType, imeOptions, privateImeOptions, imeActionLabel, imeActionId, editorExtras,

Only needed if you add a text editor into your text view, which I did not do.

I'm not going to go through all of these because I'm not sure exactly which side implements them (for example elegantTextHeight sound like something TextView does, but I'm not sure.) I suggest you actually sit down to read TextView before you make comments about it.

[0] https://developer.android.com/reference/android/text/TextPai...

Re: Ask HN: Am I crazy or is Android development awful?

#103
post #65

Earlier quoted context omitted.

Flutter is at best no different IMO, as now not only do you have to deal with Flutter's build system for Dart, you also have to deal with Kotlin/the default Android build system when you want to do something not supported by the Flutter std libs, which last I tried was quite a lot. That was a few years back though so maybe its changed (though I doubt it). Jetpack Compose is similar in its "not much better"-ness to me…

Centering a widget regardless of orientation (and detecting the orientation) is incredibly trivial with Flutter. You might have just been tired at the end of a long day and missed something.

Yeah, my thought was it was someone unfamiliar with mobile measurements. It's meant to handle mobile UIs, which means "pixel" doesn't exist as measurement because screens are different densities, different aspect ratio. You could do a thing like make an empty block with full padding to the left or right, or just center align it.

I made a mobile game in Ren'Py and it was hard for me because of the fixed assumption that something was 800x600 and such and you'd add padding on the sides lol. Unfortunately with mobile, everything is relative to each other. iOS was a little easier back when it was one size, but now it's not.

It's still a lot easier to do than fixing sizes on CSS, flexbox, etc because you'd be able to have fine control over these things.

Re: Ask HN: Am I crazy or is Android development awful?

#104

Not only is Android a mess but the Google Play Store is terrible too. There's now this insane requirement that devs have to find 20 testers on their own for two weeks before publishing anything and, incredibly, the Play Store review process is also qualitatively slower and worse than Apple's. I think we're going to see the tendency accelerate to develop and validate ideas on iOS first and only later outsource a crapp…

What do you mean “going to see”? It’s been that way for over a decade, albeit with some ebb and flow.

Re: Ask HN: Am I crazy or is Android development awful?

#105
post #96

Earlier quoted context omitted.

>The fact your [1] link is a class that's not even used in the TextView class The [1] link is only used by TextView. It is completely reliant on TextView and can't be used by other components. And yes, it is used, right here: https://android.googlesource.com/platform/frameworks/base/+/... mEditor is used over 400 times in TextView.java. Did you even read it before commenting? >The fact your [0] link is to a copy of t…

> I wonder why this great piece of code was deprecated if it's so great? And yes, that's another great thing about the Andorid SDK. Everything is deprecated while its replacements are only supported on new devices. Again, same vibes. The reason you are seeing anything like this, is because you are looking at foundation code and expecting app code. This code is going to be used by apps to run on ALL devices. Best way…

>Again, same vibes.

Are you serious? The Android devs have been working to fix the deprecation and update issue for the last decade and a half. I think you are actually the junior dev here if you are defending it. They have been slowly moving from their custom fork of Linux back to mainline, separating device-level components (eg. Bluetooth) as separate modules, trying to force device vendors to support a baseline of features via GKI, trying to separate kernel updates from higher level system updates, and trying to increase SoC support duration from vendors like Qualcomm. The minuscule device support length on Android is a real issue that Google has spent tens of millions of dollars trying to fix (and only now are they even close to being able to start fixing it). A lot of it is due to political decisions that began at the beginning of Android's lifetime, when device vendors had much more control over the operating system. The fact that pointing that out as a flaw gives you "junior programmer vibes" is seriously concerning.

Also, you failed to address even a single point I made in my post about TextView.

Re: Ask HN: Am I crazy or is Android development awful?

#106
post #4

Phones are optimized to handle RF. My engineering advice is to build your application with that in mind. A wireless webcam is the simplest thing that might work. Hosting a video stream on other hardware might be the second simplest thing. Good luck.

Except, phones have exceptional cameras. You'd be spending just as much on a dedicated camera

I remember reading “wired USB webcam” in the question, but maybe I misunderstood.

Re: Ask HN: Am I crazy or is Android development awful?

#107

Not only is Android a mess but the Google Play Store is terrible too. There's now this insane requirement that devs have to find 20 testers on their own for two weeks before publishing anything and, incredibly, the Play Store review process is also qualitatively slower and worse than Apple's. I think we're going to see the tendency accelerate to develop and validate ideas on iOS first and only later outsource a crapp…

What do you mean “going to see”? It’s been that way for over a decade, albeit with some ebb and flow.

Going to see accelerate.

Re: Ask HN: Am I crazy or is Android development awful?

#108
post #19

Kotlin is a dream. I literally love writing it.

Kotlin + Jetpack Compose is my absolute favourite way to build apps.

Jetpack Compose feels underrated around here. It basically has most of the upsides of React, but with far fewer downsides. If it weren't for the fact that it's basically Android-only[0], I would probably stick to Kotlin for all my side projects.

[0] I know there's Compose Multiplatform, but I don't trust cross-platform compilation to be reliable.

Re: Ask HN: Am I crazy or is Android development awful?

#109
post #2

I think you're just going through the learning curve of something new. You could make the same argument about a React/Next app being unnecessarily complicated with Hello World.

As someone who moved from pure iOS development to cross-platform iOS+Android development in C# with native UIs – big nope! Android development is a mess, it takes at least twice as long to build exactly the same UIs as on iOS, and there are endless edge cases between versions and also hostile API, such as not allowing a developer to know when a software keyboard appears/disappears. It was especially frustrating at the start, but has not become much easier with experience.

Re: Ask HN: Am I crazy or is Android development awful?

#110
post #65

Earlier quoted context omitted.

Flutter is at best no different IMO, as now not only do you have to deal with Flutter's build system for Dart, you also have to deal with Kotlin/the default Android build system when you want to do something not supported by the Flutter std libs, which last I tried was quite a lot. That was a few years back though so maybe its changed (though I doubt it). Jetpack Compose is similar in its "not much better"-ness to me…

Centering a widget regardless of orientation (and detecting the orientation) is incredibly trivial with Flutter. You might have just been tired at the end of a long day and missed something.

Now that I've thought about for a bit it was Compose I had that issue with.

I really just wish the Android group would get over their apparent disdain for native code and just let me write my app in C++ without having to deal with JNI BS.

Post reply on HN