By the way, the issue has been added:
Issue 16959:    ViewAnimator resizing with a 9-patch background

On 17 Mag, 23:21, Andrea Richiardi <andrea.richia...@gmail.com> wrote:
> Ok, don't know why, but using 9 patched andViewAnimatoris not good.
>
> I've ended up using a transition between two normal shapes for my list
> selector.
>
> I think I'll report the problem to developers.
>
> Bye guys.
>
> On May 17, 10:55 pm, Andrea Richiardi <andrea.richia...@gmail.com>
> wrote:
>
> > Going deep in the debug, I've notice that my blue line appears after a
> > msg.target.dispatchMessage(msg).
>
> > The what is 1000 for this message, but maybe is too generic to be
> > identified.
>
> > On May 17, 9:39 pm, Andrea Richiardi <andrea.richia...@gmail.com>
> > wrote:
>
> > > It turn out that the problem is related to those two state images:
>
> > > <item
> > >         android:state_focused="true"
> > >         android:state_pressed="true"
> > >         android:drawable="@drawable/selector_background_transition"/>
>
> > > <item
> > >         android:state_focused="false"
> > >         android:state_pressed="true"
> > >         android:drawable="@drawable/selector_background_transition"/>
>
> > > The pattern is the same as Android's list selector, and image as well
> > > (two9 patch).
>
> > > But I can't understand what I'm doing wrong. It draws a central blue
> > > line when I press the list item for the first time. From this moment
> > > on, the line is always drawn, until the View is destroyed (a new View
> > > doesn't have the blue line).
>
> > > Furthermore, it seems that this kind of error also enlarge the size of
> > > my view.
>
> > > I would like to ask here first and then to submit it to developers.
>
> > > Bye!!
>
> > > On May 15, 7:46 pm,Andrea Richiardi<andrea.richia...@gmail.com>
> > > wrote:
>
> > > > My problem is really difficult to explain actually...
>
> > > > I have aViewAnimatorwhich has some View inside.
>
> > > > Views are custom, and each view has its own background. The background
> > > > is a selector, partly taken from Android source, especially the
> > > > transition between longpress/normal press (two9 patchimages).
>
> > > > I have a Gesture Listener that triggers when a Fling (Swipe) is
> > > > performed and it changes my view with showNext().
>
> > > > TheViewAnimatordoesn't have anything as attribute, just
> > > > longClickable and focusable to "true".
> > > > It passes his states on childs, or better, state are duplicated by
> > > > child with the duplicateParentState attribute.
>
> > > > The problem is this:
>
> > > > If I swipe, the Gesture triggers and changes my Views, but the click
> > > > state is mantained, as I see the next View already pressed (and by the
> > > > way, the background draws an horizontal blue line, take from
> > > > nowhere!).
>
> > > > Skipping the blue line part, I think that the problem is on the
> > > >ViewAnimator, which holds its pressed (or long pressed) state.
>
> > > > Someone has ever run into this kind of problem? It really bothers me.
>
> > > > Thanks everybody!

-- 
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