back

リストとダイアログ (3/8)

■main.xmlの修正

続いて、メインのレイアウトであるmain.xmlを修正しましょう。ここでは、<ListView>を1つ用意するだけにしておきます。

これでいいでしょう。この<ListView>に、先ほどのlist.xmlの表示を1つ1つ組み込んでいくことになります。


(by. SYODA-Tuyano.)

※リストが表示されない場合

AddBlockなどの広告ブロックツールがONになっているとリストなどが表示されない場合があります。これらのツールをOFFにしてみてください。

<?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:textSize="20sp"
    >
    <ListView
        android:id="@+id/list"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        />
</LinearLayout>



   

記事のリストに戻る



PC Site G+ mail