TextView marquee scroll behavior different in AVD 1.6r1

by greg » Sat, 19 Sep 2009 12:09:29 GMT


Sponsored Links
 My application has a list of species names, some of which are too long
to fit in the TextView.  For example, "Black-bellied Whistling-duck"
gets truncated at "-duck".  Using AVD 1.5r3, the TextView's marquee
scroll does a nifty shift of the text to display the last five
characters (i.e., "-duck").  However, using AVD 1.6r1, the TextView's
marquee scroll shifts the text to display those last five characters
and then about a dozen spaces and then the beginning of the species
name again, as if the TextView text were "Black-bellied Whistling-
duck              Black-bellied Whistling".

Is this new behavior of the TextView's marquee scroll intentional?
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Socket connection question

Hi,

Are there any methods which I can use to establish a socket connection that
only use 3G network?

Thank you a lot!

Alex

-- 

2. options menu problems with SurfaceView and ListView

In my application, I have extended SurfaceView and ListView. I create
a LinearLayout as below


        mainForm = new LinearLayout(this);
        mainForm.setOrientation(LinearLayout.VERTICAL);
        mainForm.setLayoutParams(new LinearLayout.LayoutParams(
                LinearLayout.LayoutParams.FILL_PARENT,
                LinearLayout.LayoutParams.FILL_PARENT));

I then add the SurfaceView and ListView to the mainForm and then

setContentView(mainForm);


I also override onPrepareOptionsMenu and call menu.clear() and then
dynamically create menus each time the menu button is pressed by the
user.

The application loads fine and the SurfaceView works fine as I
directly draw images to it in a sleep loop.

The ListView displays items and is desined to refreshed with new
items.

The options menu also displays once as well.

However, once the SurfaceView is running and the ListView is loaded, a
second call to onPrepareOptionsMenu by pressing the menu key disrupts
the SurfaceView drawing, causing it to get stuck on the last image it
was drawing. But the list view does refresh the adapter to change
content once. After that, the application is hung and the SurfaceView
keeps playing the same images in a random order.

I am using runOnUiThread to update the views in the mainForm
(LinearLayout) and the Lunar Landing template for the SurfaceView as
shown below

In Activity

public void ViewsUpdate() {
        System.out.println("Before ViewsUpdate method");
        runOnUiThread(new updateDoer());
}


public class updateDoer implements Runnable {

        public updateDoer(){

        }

        public void run() {

                contentDone2();
                viewForm.invalidate();
//viewForm is where the ListView and other views are added

        }
}

In SurfaceView
private void drawSurfaceView(){
                Canvas c = null;
            try {
                c = mSurfaceHolder.lockCanvas(null);
                synchronized (mSurfaceHolder) {
                    if (mMode == STATE_RUNNING)
                    doDraw(c);
                }
            } finally {
                // do this in a finally so that if an exception is
thrown
                // during the above, we don't leave the Surface in an
                // inconsistent state
                if (c != null) {
                    mSurfaceHolder.unlockCanvasAndPost(c);
                }
            }

        }

I am at a loss as to why everything gets clobbered after the options
menu is built and displayed the second time.

-- 

3. OOT. RANTANGAN

4. Oot mau tanya milis I'd bada..

5. Authenticating apps sending intents on the receiving en

6. AndroidGroup: Nested Actvities

7. Making Video files Android ready for playback over HTTP