开发者

How can I make this layout?

I am a new comer in android. I've tried to make a la开发者_JAVA技巧yout like picture below but I can't make it.

How can I make this layout?

That rectangle is an image and two others are text view. I've tried to make it but it always wrong. Looking forward to hearing from you guys, thanks for advance.


Define one layout as follows:

<?xml version="1.0" encoding="utf-8"?>  
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"  
    android:id="@+id/rlGridRow"  
    android:layout_width="fill_parent"  
    android:layout_height="wrap_content"    
    >  
<ImageView    
    android:id="@+id/imageView01"    
    android:layout_width="36.0dip"  
    android:layout_height="36.0dip"  
    android:scaleType="fitCenter"  
    android:layout_alignParentLeft="true" />  
<TextView android:id="@+id/txtLink1"  
    android:paddingLeft="6.0dip"    
    android:layout_width="wrap_content"  
    android:layout_height="wrap_content"    
    android:textColor="#FF00FF"  
    android:layout_toRightOf="@id/imageView01" />  
<TextView android:id="@+id/txtLink2"  
    android:paddingLeft="6.0dip"    
    android:paddingBottom="8.0dip"  
    android:layout_width="wrap_content"    
    android:layout_height="wrap_content"  
    android:textColor="#00FFFF"  
    android:textSize="12sp"  
    android:layout_marginTop="-4.0dip" android:layout_toRightOf="@id/imageView01"  
    android:layout_below="@id/txtLink1" />  
</RelativeLayout>  

See this link for additional info.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜