have tried setPadding ??? On Wed, May 26, 2010 at 2:14 PM, Erik H <[email protected]> wrote:
> Hi, > > I'm having a small problem with drawing a View offscreen to a Bitmap. > > The View is created using LayoutInflater.inflate(int resource, > ViewGroup root) with null passed to the root parameter. The View has a > fixed size (200x180 pixels). I can create a Bitmap for this View > either by using the method View.getDrawingCache() or by calling > View.draw(Canvas canvas) using a Canvas that in turn has a backing > Bitmap. > > This works fine if the View doesn't change after the inflate. However, > if I have a TextView inside my View that I will update, the size of > the TextView is never updated regardless of what method I call on the > View (requestLayout(), forceLayout() invalidate() etc.). If I display > the View on screen directly, everything works fine (sizes are updated > as needed, etc.). > > What is the correct way of drawing Views off screen and being able to > update their layout when needed? > > -- > 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]<android-developers%[email protected]> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- 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

