AbPK for Android updated

I spent the last few days delving back into the dark world of Eclipse/Android/Java. I don’t wish that on my worst enemy. The simplest things seem to take forever to accomplish.

This update includes the following improvements and fixes:

  • Added extrapolated peak and trough to Model view and Email consult functions.
  • Fixed tab order on patient data and serum level screens.
  • Modified CrCl Adj body weight method to use 30% of excess weight (was 20%).
  • Moved the Email function up to a button and the Clear function down to the menu.
  • Made dialog titles one line only (quick fix to the “Huge” font problem),
  • Updated the help files.

The Jellybean “Huge” font issue seems to be a common problem among developers. Because Android does not have an “Auto-size” function, there are many code hacks for re-sizing fonts to fit text on a single line. None of the methods are fool proof. So, instead of adding all that verbose java code, I just added the layout element android:lines=”1″ for the titles on each window. A K-I-S-S solution, my favorite kind. The text is truncated, but it is simply not important.

Fixing the tab order was also a trial and error affair. The serum level input would jump from dose to trough, skipping interval and number of doses. This was also a no-code layout fix with the use of the element android:nextFocusDown=”@+id/next_text”. Many blogs leave out the “+”, but this does not work without it.

Setting up the Nexus 7 for USB debugging was an adventure as Google has hidden the developer functions in Jellybean. The weirdest thing in the setup is to set your USB connection as Camera (PTP) instead of Media device (MTP) – WTF. Here is a nice step-by-step how-to blog post:
      Nexus 7 android development

I haven’t updated the free version for nearly three years. But I did this time around, thinking maybe some of you rich freeloading pharmacists will see fit to support your fellow pharmacist and hardworking small businessman. Haha, I live in a fantasy world.

Comments are closed.