Issue
I just cant add animated pin on map. For clarification see app like (Maps app,Glypse app) i have added a snap
see the circled arrow.
Solution
Finally i got the solution..i used animation for that here it is which might help to someone
This is my fadein.xml file
<?xml version="1.0" encoding="UTF-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android" >
<alpha
android:duration="900"
android:fromAlpha="0.2"
android:interpolator="@android:anim/accelerate_interpolator"
android:repeatCount="infinite"
android:toAlpha="1.0" />
</set>
which i applied on image(pin) and invoke animation from java file like this..
imgv.setImageResource(R.drawable.pinred);
Animation myanim = AnimationUtils.loadAnimation(DealsActivity.this,
R.anim.fadein);
imgv.startAnimation(myanim);
MapView.LayoutParams lp = new MapView.LayoutParams(
MapView.LayoutParams.WRAP_CONTENT,
MapView.LayoutParams.WRAP_CONTENT, Currentgp,
MapView.LayoutParams.BOTTOM_CENTER);
mv.addView(imgv, lp);
where.. imgv is object of ImageView and mv is of Mapview
Answered By - Kalpesh Lakhani
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.