I'm having some problems porting a Java application to work in Android
platform. I detected an incompatibility problem between java sun and
Adroid sdk in java.lang.Class.

I oberved that:
public Field[]  getFields()
Returns an array containing Field objects describing all fields which
are defined. That's array is sorted as attributes are declared in the
main Class in sun jdk. For example, next Class is defined as:

public class Example {
    public boolean stop;
    public int atr1;
    public String name;
    ....

}

When i do next operation with a Example class:
Field[] fields = e.getClass.getFields()

I got:
fields[0] = stop
fields[1] = atr1
fields[2] = name

The same operation in Android sdk returns:
fields[0] = atr1
fields[1] = name
fields[2] = stop

The same arrays is returned in alphabetical order.

It is critic for my application to get the Fields in the same order in
which they have been declared in the main class. I don't know if it is
possible in Android.

Thanks

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to