2

My specific case:

I'm developing an Android app and was using a flag in an Intent to bring an Activity to front instead of re-creating it. It worked, mostly as expected. The EditText in a Fragment (that was inside the Activity) broke, for lack of a better term. Despite its name, the EditText could not be edited, and attempting to do so would crash the application.

After extensive trial and error, and pro Google skills, I found a property that could be declared in Manifest.xml:

android:launchMode="singleInstance"

I declared that where I needed to and everything works perfectly fine (problem solved!).

However, I'm still wondering why the EditText was 'broken' (uneditable, attempting to type/delete/etc crashed the app). I've solved my problem, but the problem shouldn't have occurred in the first place. Would a well-formed question regarding the why of the behavior (and looking for a solution for the previous method I was using) be on-topic even if I've already found another solution that works?

1 Answer 1

3

I'd say yes. Work arounds are a nice thing, but they have side effects. Besides, finding the real answer would help you see other potential problems coming at you. Just be sure to word your question well (that you're curious why this is the case, rather than looking for how to fix it necessarily). Mentioning the workaround may help too, as a clue to readers for what's actually happening.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .