Below is our test project:

public class AndroidTest extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        LinearLayout ll = new LinearLayout(this);
        final TextView tv = new TextView(this);
 
tv.setText("XXXkl;dfjasjkldfjksdhfjksdfhasdasdasdasdasdasdasdasdksjdf");
        tv.setFocusable(true);
        tv.setClickable(true);
        tv.setSingleLine();
        tv.setEllipsize(TruncateAt.MARQUEE);
        tv.setTextColor(Color.WHITE);
        tv.setOnClickListener(new OnClickListener() {

            public void onClick(View v) {
                tv.setSelected(true);
            }

        });
        ll.addView(tv, new
LinearLayout.LayoutParams(100,LayoutParams.WRAP_CONTENT));
        ll.addView(new TempView(this));
        setContentView(ll);
    }



    private class TempView extends ImageView {

        public TempView(Context context) {
            super(context);
            setBackgroundResource(R.drawable.icon);
        }
        @Override
        protected void onDraw(Canvas canvas) {
            super.onDraw(canvas);
            Log.i("ImageView",
"ImageViewImageViewImageViewImageViewImageView");
        }

    }

}

It's very strait and when clicking textview to start scrolling text,
TempView's onDrawing is keeping to be called!
However, we used Dev Tool ->show screen update to check redraw area
and saw only textview flashing!

Who can tell me why!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to