0

I would like to display long texts in InfoWindow and I thought it would be great if the text scrolled automatically. I have tried with marquee, but the text is not scrolling. Any ideas what am I doing wrong?

Here is my layout code:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
    android:id="@+id/title"
    android:layout_width="@dimen/infoWindowMaxWidth"
    android:layout_height="wrap_content"
    android:textStyle="bold"
    android:lines="1"
    android:layout_centerInParent="true"
    android:textColor="@android:color/white"
    android:ellipsize="marquee"
    android:marqueeRepeatLimit="marquee_forever"
    android:focusable="true"
    android:focusableInTouchMode="true"
    android:scrollHorizontally="true" />
</RelativeLayout>

My InfoWindowAdapter:

class CustomInfoWindowAdapter : Java.Lang.Object, GoogleMap.IInfoWindowAdapter
    {
       .
       .
       .

        private void Render(Marker marker, View view)
        {
            var textView = view.FindViewById<TextView>(Resource.Id.title);
            textView.Text = marker.Title;
            textView.Selected = true;
        }
    }
Adam Ivancza
  • 2,459
  • 1
  • 25
  • 36

1 Answers1

2

The problem is the info window is not a live view so you will not be able to do what you want to do

tyczj
  • 71,600
  • 54
  • 194
  • 296
  • nothing easy http://stackoverflow.com/questions/14123243/google-maps-api-v2-custom-infowindow-like-in-original-android-google-maps/15040761#15040761 – tyczj Nov 15 '13 at 15:01
  • @Roosevelt The link tyczj provided doesn't solve animating issues. This is actually "easier" if you hack it to refresh info window periodically with some increasing negative margins. – MaciejGórski Nov 15 '13 at 15:12
  • Thank you for your suggestions! I will definitely try to make it work :) – Adam Ivancza Nov 15 '13 at 15:24