Hi

I've a problem with getting a redraw of a View in my application.


My app's main.xml looks like this:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">

    <com.myOwn.MyView
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"/>

    <ListView
    android:id="@+id/clueview"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"/>

</LinearLayout>


Both views act to represent the same data: the selected position in
the ListView should reflect in the com.myOwn.MyView View and vice-
versa.  The problem is that whilst the underlying data is correct
(i.e. that is to be displayed) when selecting a position in the
ListView, the MyView View doesn't get redrawn despite a call to
MyView.invalidate().  I had intermittant luck with calling requestFocus
() before calling invalidate(), but it only works once (and I've not
investigated further).

Having said all that, the inverse (i.e. setting a value in the MyView
View affects/updates the ListView) works correctly.

Any ideas would be gratefully received.

Cheers

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

Reply via email to