PNG Alpha Channels Don’t Render So Well On Top of SurfaceViews
Working on the new UI for our upcoming 1.1 release of Wheel of Yum I ran into a bug in how Android renders the alpha channel data of a PNG file laid out above a SurfaceView.
Working on the new UI for our upcoming 1.1 release of Wheel of Yum I ran into a bug in how Android renders the alpha channel data of a PNG file laid out above a SurfaceView.
Unable to sleep, I got hacking at our upcoming release of Wheel of Yum this morning only to get totally stuck on a bug in how Android animates empty container views. In our particular case we have a custom view derived from FrameLayout that adds a single LinearLayout as it’s only child view upon construction. At runtime, our custom view listens for Touch events and dynamically adds\removes various ImageView instances to the inner LinearLayout. When a given Touch event is complete (i.e. MotionEvent.ACTION_UP) the LinearLayout starts a fade-out style animation: