Office Hours — Today, February 6

 Feb 6 8:50 AM Mark M. has entered the room 8:55 AM Mark M. turned on guest access 9:00 AM Rajeef has entered the room Mark M. hello, Rajeef! how can I help you today? Rajeef View paste Hi Mark ! Hope you're doing good. I'm working on a project which involves me to a) Display LaTex codes b) Allow user to enter LaTex formulas View paste The string containing LaTex code is fetched from server. Nothing is local. Currently for displaying I'm using this library - https://github.com/kexanie/MathView (Which is a wrapper around webview + mathjax) But I'm still unable to convert all the strings to 100% LaTex formulas. Any suggestions / libraries that you have come across ? Mark M. I have never touched LaTeX in my life, sorry Rajeef Good for you !! :/ Its such a "web" thing, trying to port it to Android/Java is turning out to be a nightmare. 9:05 AM Rajeef I guess, there is no point asking about how to let users enter LaTex code via EditText. Mark M. well, they can probably enter raw LaTeX markup if you mean "enter a mathematical expression via EditText", that's unlikely to work well Rajeef Yup. That's what I meant. Mark M. if you wanted something that worked using ordinary widgets, you'd need some sort of a formula builder, mixing EditText and other widgets to build up a formula in pieces in principle, you could get a lot more sophisticated than that, by rolling your own widget from scratch, but that's likely to be rather involved Rajeef Hmm.. That's an interesting angle. What if I let use a scratch pad (signatureview) and then from their input, detect the formula / text they have entered (I'm assuming there are libraries for handwriting recognition, haven't checked). let users* Mark M. I am not aware of handwriting recognition libraries, but I have not been looking for them, either and on mobile, to get accuracy, you would all but require a stylus 9:10 AM Rajeef Yup. That would be bummer since my target user group are using low end phones. Thanks Mark. Do you have time for one more question ? Mark M. I have ~49 minutes for more questions :-) Rajeef View paste :D I got mixed up with timezone My second problem is related to this error - Fatal Exception: java.lang.IllegalStateException Can not perform this action after onSaveInstanceState android.support.v4.app.FragmentManagerImpl.checkStateLoss android.support.v4.app.BackStackRecord.commit I understand its because when fragmenttransaction commit was called, the activity state wasn't available. (This much gathered from googling). Mark M. yeah, IIRC, you are trying to commit() a FragmentTransaction at an inopportune time if you commit() as part of direct user input, you should not run into that if, however, you are trying to do transactions based upon other events... that's where I recall getting into this pickle I haven't run into the problem in a couple of years, though so my memory is fuzzy on the details 9:15 AM Rajeef View paste Aah ok. Just to give you a quick context - I have an activity which contains a fragment. The activity makes a n/w call, populates an arraylist with object models. Based on action from fragment, the fragment is replaced with a new fragment, based on the object from arraylist. (Its basically a quiz app). Mark M. "based on action from fragment, the fragment is replaced with a new fragment" -- what does "action" mean here? Rajeef Its a button click (which is checking if answer is correct). Mark M. hmmm... off the cuff, that seems OK Rajeef View paste So only two place fragment transaction commit is called is - - onCreate of activity (when the first fragment is populated). - Whenever the button is clicked in fragment, the method in activity to replace the fragment is called. Mark M. I take it that the stack trace is not showing you where your problem transaction is coming from? 9:20 AM Rajeef View paste So this transaction is carried out in a single method inside the activity, and the fragments as well as activity, refer to this method. Stacktrace could take me upto what I posted above. (The code is ProGuard enabled also. So the error logging tool - crashlytics/fabric - has pretty much rest of the stacktrace obfuscated :( ) One thing I forgot to say is - I'm unable to reproduce this consistently. Mark M. I haven't used Crashlytics, but I thought that you could upload your ProGuard mapping file, for them to decode the obfuscated stack trace Rajeef Yeah. the decode file is not being uploaded, since the deobs metadata generated by their plugin, is empty. Its nightmare one after the other !! I had a raised a ticket with them and we're still working on this together for past 1 month, to see what's causing this issue 9:25 AM Rajeef So one of the solution I saw was to user commitAllowingStateLoss (). Do you think its a good idea ? Mark M. whenever I ran into this, I always found the root cause and fixed it commitAllowingStateLoss() scared me :-) Rajeef :D Documentation wasn't helpful either regarding using commitAllowingStateLoss() ( http://developer.android.com/intl/es/reference/...) Mark M. that's what scared me Rajeef View paste Ok. So I need more data to fix thing it from the root. I"ll wait for it then. Thank you so much Mark. Its always good to listen from somebody more experienced. Kind of reduces the imposter syndrome effect :D Mark M. either that, or we're both imposters :-) 9:30 AM Rajeef :) Cheers. I'm signing out. Mark M. have a pleasant day! Rajeef You too! Rajeef has left the room 9:55 AM Mark M. turned off guest access

• Mark Murphy
• Rajeef