2011-09-15 9 views

答えて

1

正直言って、質問は良いものではなく、ここの要件に本当に適合しません。とにかく、あなたが完全に初心者であるように見えるので、ここであなたの最初の質問(歓迎!)があるので、私はいくつかの情報を提供します。

2種類のビューが必要です。最初の画像はImageViewで、画像を表示することができます。 2番目のURLは単純なTextViewで、テキストをURLに設定することができます。

横に並べて表示するには、向きを水平に設定してLinearLayoutが必要です。そのレイアウトの中に、ImageViewとTextViewを配置することができます。両方のビューのlayout_widthはwrap_contentに、layout_weightは1に設定する必要があります。

アクティビティでは、イメージをImageViewに設定し、TextViewのURLを設定することができます。ここで

は、単純なXMLレイアウトです:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:orientation="horizontal" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent"> 
    <ImageView 
    android:src="@drawable/icon" 
    android:layout_width="wrap_content" 
    android:layout_height="fill_parent" 
    android:layout_weight="1"/> 
    <TextView 
    android:text="dummytext" 
    android:layout_width="wrap_content" 
    android:layout_height="fill_parent" 
    android:layout_weight="1"/> 
</LinearLayout> 

LinearLayout tutoriallot of views and layouts are shown and explained公式ドキュメントで見つけることができます。

関連する問題