Wednesday, September 22, 2010

[android-developers] Re: How to prevent aImageView from Overlapping a textview

I am sorry to be a bother but I dont know how to use this method. I
tired : ViewGroup.recomputeViewAttributes(picView);
and it gave me an error saying I couldnt make a static reference to a
non static method.

I also tried to set the max height of the image to the height of the
window - the height of the textview but that didnt work either.
Anymore suggestions?

On Sep 22, 3:14 pm, DanH <danhi...@ieee.org> wrote:
> Seems like you want to request that the layout be recomputed after
> changing the image.  Just a guess, but something like
> ViewGroup.recomputeViewAttributes might be the answer.
>
> On Sep 21, 10:33 pm, Jacob <je77...@gmail.com> wrote:
>
> > I currently have a linearayout that contains a textview and an
> > imageview. My Imageview pulls images from the web and all the images
> > are different sizes. So some of the images override the TextView at
> > the top (which is the tittle). I have tried using padding but to no
> > avail. Any help would be greatly appreciated. If I need to include
> > more code please let me know.
> > <?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"
> >         >
> >         <android.gesture.GestureOverlayView
> >         android:id="@+id/gestures"
> >         android:layout_width="fill_parent"
> >         android:layout_height="0dip"
> >         android:layout_weight="1.0"
> >         >
> >     <TextView
> >         android:id="@+id/title"
> >                 android:layout_width="fill_parent"
> >                 android:layout_height="wrap_content"
> >                 android:text=""
> >                 android:paddingBottom="10px"
> >         />
> >         <ImageView
> >                 android:id="@+id/picview"
> >                 android:layout_width="wrap_content"
> >                 android:layout_height="wrap_content"
> >                 android:padding="10px"
> >                 android:cropToPadding="true"
> >         />
> >         </android.gesture.GestureOverlayView>
>
> > </LinearLayout>

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment