2010-10-11 5 views
4

est-il un moyen de faire mon film à textview autour d'autres points de vue? Par exemple dans l'image, y a-t-il un moyen de l'amener au bord une fois qu'il est au-dessous de l'imageview?Avoir une enveloppe de vue autour d'une autre vue

alt text

Ceci est mon xml

<?xml version="1.0" encoding="utf-8"?> 

<RelativeLayout 
xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_width="fill_parent" 
android:layout_height="fill_parent" 
android:background="@android:color/white"> 


    <LinearLayout android:id="@+id/AUTHOR_TITLE" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:orientation="vertical" 

     android:layout_alignParentTop="True"> 

     <TextView 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:textSize="20dip" 
      android:text="Author Name" 
      /> 

    </LinearLayout> 
     <RelativeLayout 
     xmlns:android="http://schemas.android.com/apk/res/android" 
     android:layout_width="wrap_content" 

android:layout_height="wrap_content"  
android:layout_below="@id/AUTHOR_TITLE"> 


      <ImageView android:id="@+id/PICTURE" 
      android:layout_alignParentLeft="True" 
      android:layout_alignParentTop="True" 
      android:src="@drawable/icon" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" /> 
        <TextView android:id="@+id/DESCRIPTION" 
      android:layout_toRightOf="@id/PICTURE" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:text="OMGTESTLOLWTF 
OMGTESTLOLWTF OMGTESTLOLWTF 
OMGTESTLOLWTF OMGTESTLOLWTF 
OMGTESTLOLWTF OMGTESTLOLWTF 
OMGTESTLOLWTF OMGTESTLOLWTF 
OMGTESTLOLWTF OMGTESTLOLWTF 
OMGTESTLOLWTF OMGTESTLOLWTF 
OMGTESTLOLWTF OMGTESTLOLWTF 
OMGTESTLOLWTF OMGTESTLOLWTF 
OMGTESTLOLWTF OMGTESTLOLWTF 
OMGTESTLOLWTF OMGTESTLOLWTF 
OMGTESTLOLWTF OMGTESTLOLWTF 
OMGTESTLOLWTF OMGTESTLOLWTF 
OMGTESTLOLWTF OMGTESTLOLWTF 
OMGTESTLOLWTF OMGTESTLOLWTF 
OMGTESTLOLWTF OMGTESTLOLWTF 
OMGTESTLOLWTF OMGTESTLOLWTF 
OMGTESTLOLWTF OMGTESTLOLWTF 
OMGTESTLOLWTF OMGTESTLOLWTF 
OMGTESTLOLWTF OMGTESTLOLWTF 
OMGTESTLOLWTF OMGTESTLOLWTF 
OMGTESTLOLWTF OMGTESTLOLWTF 
OMGTESTLOLWTF OMGTESTLOLWTF 
OMGTESTLOLWTF OMGTESTLOLWTF 
OMGTESTLOLWTF OMGTESTLOLWTF 
OMGTESTLOLWTF "/> 
     </RelativeLayout> 

</RelativeLayout> 

Je suis vraiment surpris que personne n'a encore fait = \ Soupir.

Répondre

3

Ce n'est pas possible actuellement avec construit dans les widgets. Vous pouvez rouler le vôtre, ça ne devrait pas être trop dur. Vous devez étendre l'une des classes ViewGroup et ajouter les images et le texte à cela. Ensuite, dans onLayout(), vous pouvez trouver comment faire circuler le texte afin qu'il enveloppe les images.

+1

peut vous donner plusieurs étapes? – pengwang

+0

Pouvez-vous réellement le faire sans changer le code de TextView? –

Questions connexes