DateUtils.getRelativeTimeSpanString in v0.9

by Guillaume Perrot » Fri, 22 Aug 2008 18:18:20 GMT


Sponsored Links
 In Android SDK v0.9, the DateUtils class has been removed.
Where is the equivalent to format relative dates ? The function was
"getRelativeTimeSpanString", I hope I don't have to code it myself.
--~--~---------~--~----~------------~-------~--~----~



DateUtils.getRelativeTimeSpanString in v0.9

by Megha Joshi » Tue, 26 Aug 2008 01:50:43 GMT


 2008/8/25 Guillaume Perrot <[EMAIL PROTECTED]>



Yes...DateUtils will be public in the next release...



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. EditText causes app to crash

I have been breaking my head over this for the past 1 month over this
error I am having on certain HTC models. The app runs fine on other
phones but crashes with a long list of exceptions. This is what I got
from the market:

java.lang.RuntimeException: Unable to start activity
ComponentInfo{com.vtcreator.android360/com.myapp.MyActivity}:
android.view.InflateException: Binary XML file line #16: Error
inflating class android.widget.EditText
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2838)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2859)
at android.app.ActivityThread.access$2300(ActivityThread.java:136)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:
2179)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:143)
at android.app.ActivityThread.main(ActivityThread.java:5073)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:858)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #16:
Error inflating class android.widget.EditText
at android.view.LayoutInflater.createView(LayoutInflater.java:513)
at
com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:
56)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:
563)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
at
com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:
217)
at android.app.Activity.setContentView(Activity.java:1701)
at
com.vtcreator.android360.activities.SelectUsernameActivity.onCreate(SelectUsernameActivity.java:
24)
at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1088)
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2802)
... 11 more
Caused by: java.lang.reflect.InvocationTargetException
at android.widget.EditText.<init>(EditText.java:53)
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
at android.view.LayoutInflater.createView(LayoutInflater.java:500)
... 23 more
Caused by: java.lang.NullPointerException
at
com.htc.textselection.TextSelectionMethodImpl.initAnchorAndMagnifier(TextSelectionMethodImpl.java:
310)
at
com.htc.textselection.TextSelectionMethodImpl.initialize(TextSelectionMethodImpl.java:
297)
at android.widget.TextView.setText(TextView.java:2743)
at android.widget.TextView.setText(TextView.java:2623)
at android.widget.EditText.setText(EditText.java:82)
at android.widget.TextView.<init>(TextView.java:924)
at android.widget.EditText.<init>(EditText.java:57)
... 27 more


The same thing happens with an EditTextPreference item. I have no idea
how to solve this, and whatever I have tried has failed. Have posted
this as a bug on the Android bug list as well as on StackOverflow.

http://code.google.com/p/android/issues/detail?id=16640&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars
http://stackoverflow.com/questions/5500609/app-crashing-in-desire-hd

-- 

2. Is it true, Paid Aandroid apps from indian origin can not be published?

Could any one from android support please confirm that Paid Aandroid
apps from indian origin can not be published, it is true?

-- 

3. How to reverse camera view?

4. add overlay at my current location

5. facebook sdk login not working on Samsung 9003 but working on htc

6. Logcat not working on eclipse

7. Convert from Polyline to ArrayList<Location>