Tuesday, August 27, 2013

Time Picker Problem

An apparent discovery today being that, the android time picker actually doesnt update the time, when the "setIs24Hours" function is called. hence showing 10 am no matter if its 10 am or 10 pm when switching to 24hr clock.

The work around ive found for this problem, is quite a bit of common sense, but not very obvious, you have to set the time format to 24/12 hr clock before actually setting the time. This will avoid this problem.

BEST PRACTICE : Always do the settings of a object before assigning any values.

Well comments and views are welcome, till next time!

Sunday, August 11, 2013

Observation On Android OS About The Keyboard

The other day i encountered a baffling problem, where no matter what i did, the android keyboard wouldnt appear on activity startup, even though the editText was in focus, i even tried explicitly calling it, but no luck.

But heres the catch, when you wrap the focusable editTexts in a scrollView the keyboard shows up automatically, no need to call it at all. The scrollView collapses and the keyboard shows.

I tested a theory, and seems apparently true, though i could find no reference to it on the net, the android OS seems to block the keyboard from automatically being shown (even if explicitly called), if its going to show up over a focusable field (anything you can type in).

This makes sense since you would like to see what your typing when your typing it! Now for the reason it works with the scrollView, its quite simple, the andoird OS can keep the field in view by scrolling the view, so it isnt  a problem.

I havent found a way to override this feature, but the soultion seems viable and logical, wrapping activity components in a scrollview.

BEST PRACTICE : Have a scrollView at the activity base.

Well comments and views are welcome, till next time!

Device Information:

Thursday, August 8, 2013

The First Hello From Us!

Hello everyone, ive started these blogs to keep track of specific information for my self and any others wanting to know about some of the weird, unexpected and unorthodox things in the 3 platforms, java, c# and android.

Ill be posting from time to time when i find stuff, questions and comments are welcome!

Following other the links for all three blogs:
System.Out.println("Hello Code Gears"); (Java Blog)
Console.WriteLine("Hello Code Gears"); (C# Blog)
Log.d("Hello Code Gears"); (Android Blog)