Skip to content

Tag: android

android getlastknownlocation always null in emulator

It seems a common issue, but i really can’t understand why is it happening even though i read ton of simialr issues. I am playing with a basic location class on a emulator device, i set everything – permissions (FINE and COARSE) , i have set the coordinates in the DDMS i also tried using the telne…

LOG4J in Android

I have a Java Project with a lot of files, which is using LOG4J. Now I am trying to Port it to the Android platform. Is it possible to reuse the code as it is, with LOG4J function calls? Current understanding: Property configuration won’t work (beans dependency) I tried with LOG4J for Android and SL4J L…

android on Text Change Listener

I have a situation, where there are two fields. field1 and field2. All I want to do is empty field2 when field1 is changed and vice versa. So at the end only one field has content on it. It works fine if I attach addTextChangedListener to field1 only, but when I do it for both fields the app crashes. Obviousl…

Chaining static methods

This might not have a solution, or I might have not been able to find one, but here it is: !! Note: the code below is incorrect, I know. I just want to show what exactly I would like to accomplish. I would like to do something on the lines: … in order to do the below somewhere in another

Draw a line with curved edges in Android

I am using canvas.drawLine to draw some line in android but the lines are too sharp but i need a curved edges Here the 1 is what i have and 2 is what i want to achieve, means a line with curved edges rather than straight edges How can I achieve that ?? EDIT 2: I am trying to use