Creating styles in android without xml?
My question is.. Is it possible to create styles in android programmatically without any xml?

I wanted this because I need to use animation for a popup window when it enters and exits..
What i currently have is:

    <resources>
        <style name="MyAnimation" parent="android:Animation">
        <item name="android:windowEnterAnimation">@anim/in_animation</item>
        <item name="android:windowExitAnimation">@anim/out_animation</item>
    </style>
</resources> 

However, I want to decide the animation to use at runtime. This is because I would be calling the window which needs to be animated, on clicking some images on the screen.
These images are placed in horizontal scrollview and there are 4-5 such horizontal scrollviews on the screen.
And the animation I'm looking at is like..appearing from the view clicked, and growing to actual size alongwith translation to the center of the screen.
Since the position of images is not fixed, I cannot use an xml directly to specify the animation and hence need to make the style via code..

If there is any other way to achieve what i am aiming at, then please do let me know.

Thanks.
Creating styles in android without xml?
===

My question is.. Is it possible to create styles in android programmatically without any xml?

I wanted this because I need to use animation for a popup window when it enters and exits..
What i currently have is:

    <resources>
        <style name="MyAnimation" parent="android:Animation">
        <item name="android:windowEnterAnimation">@anim/in_animation</item>
        <item name="android:windowExitAnimation">@anim/out_animation</item>
    </style>
</resources> 

However, I want to decide the animation to use at runtime. This is because I would be calling the window which needs to be animated, on clicking some images on the screen.
These images are placed in horizontal scrollview and there are 4-5 such horizontal scrollviews on the screen.
And the animation I'm looking at is like..appearing from the view clicked, and growing to actual size alongwith translation to the center of the screen.
Since the position of images is not fixed, I cannot use an xml directly to specify the animation and hence need to make the style via code..

If there is any other way to achieve what i am aiming at, then please do let me know.

Thanks.