views:

66

answers:

1

I have a Android project for SDK1.5 and now I want to convert it for SDK2.1 with some constant changes for the UI. Should I create a complete new Project or the existing project can be manipulated for including the lastest changes. I'm using Eclipse for Development.

+1  A: 

You can use reflection and conditional class loading in many cases to allow you to support multiple API versions in a single app.

CommonsWare
Please give some more light on this issue
y ramesh rao
I linked to two projects that demonstrate the techniques. The techniques have nothing to do with Android -- they are standard Java.
CommonsWare
Ya with this I can change the code related things but some of my resources are also different with the related the SDK versions so how can that dependency be removed.
y ramesh rao
By using version resource sets (e.g., -v4 limits resources to be used by API 4 and above). http://developer.android.com/guide/topics/resources/resources-i18n.html#AlternateResources
CommonsWare
i'm creating a two folder like res/drawable/v3 and res/drawable/v7 but the same things are reflected under R.java so therefore I'm not able to use it in any way.
y ramesh rao
Those are not the correct directory names. Please read the Web page that I linked to.
CommonsWare
Ya @CommonsWare found solution and working fine thanks for replying and addressing the issue.
y ramesh rao