1

この種の質問が数回尋ねられたことは知っていますが、私が読んだすべてのスレッドは、この特定の問題について実際には役に立たなかったので、次のことを示します。

学校での IT の授業では、独自のアプリを開発する必要があります。私の仲間とは異なり、私はすでにAndroidアプリを開発した経験がありますが、この問題は私を圧倒しました... :(

私のアイデアは、生徒の管理アプリを作成して、時間割、今後の試験などを追跡することでした...

しかし、それらの「レッスンのプレースホルダーのもの」を実現する方法がわからないため、時間割に行き詰まりました(名前の付け方がわからない:D)。

私のソースコードを見るだけで、次のことが理解できます。

section_table.xml

<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_marginBottom="16dp" >

<TableRow
    android:id="@+id/top_row"
    android:layout_width="match_parent"
    android:layout_height="40dp"
    android:layout_weight="1" >

    <TextView
        android:id="@+id/spaceView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_weight="0.16" />

    <TextView
        android:id="@+id/monday"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_weight="0.16"
        android:text="@string/monday" />

    <TextView
        android:id="@+id/tuesday"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_weight="0.16"
        android:text="@string/tuesday" />

    <TextView
        android:id="@+id/wednesday"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_weight="0.16"
        android:text="@string/wednesday" />

    <TextView
        android:id="@+id/thursday"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_weight="0.16"
        android:text="@string/thursday" />

    <TextView
        android:id="@+id/friday"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_weight="0.16"
        android:text="@string/friday" />
</TableRow>

<TableRow
    android:id="@+id/tableRow1"
    android:layout_width="match_parent"
    android:layout_height="40dp"
    android:layout_weight="1"
    android:background="@drawable/border" >

    <TextView
        android:id="@+id/textView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:paddingLeft="5dp"
        android:text="1" />

</TableRow>

<TableRow
    android:id="@+id/tableRow2"
    android:layout_width="match_parent"
    android:layout_height="40dp"
    android:layout_weight="1"
    android:background="@drawable/border" >

    <TextView
        android:id="@+id/textView2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:paddingLeft="5dp"
        android:text="2" />
</TableRow>

<TableRow
    android:id="@+id/tableRow3"
    android:layout_width="match_parent"
    android:layout_height="40dp"
    android:layout_weight="1"
    android:background="@drawable/border" >

    <TextView
        android:id="@+id/textView3"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:paddingLeft="5dp"
        android:text="3" />
</TableRow>

<TableRow
    android:id="@+id/tableRow4"
    android:layout_width="match_parent"
    android:layout_height="40dp"
    android:layout_weight="1"
    android:background="@drawable/border" >

    <TextView
        android:id="@+id/textView4"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:paddingLeft="5dp"
        android:text="4" />
</TableRow>

<TableRow
    android:id="@+id/tableRow5"
    android:layout_width="match_parent"
    android:layout_height="40dp"
    android:layout_weight="1"
    android:background="@drawable/border" >

    <TextView
        android:id="@+id/textView5"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:paddingLeft="5dp"
        android:text="5" />
</TableRow>

<TableRow
    android:id="@+id/tableRow6"
    android:layout_width="match_parent"
    android:layout_height="40dp"
    android:layout_weight="1"
    android:background="@drawable/border" >

    <TextView
        android:id="@+id/textView6"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:paddingLeft="5dp"
        android:text="6" />
</TableRow>

<TableRow
    android:id="@+id/tableRow7"
    android:layout_width="match_parent"
    android:layout_height="40dp"
    android:layout_weight="1"
    android:background="@drawable/border" >

    <TextView
        android:id="@+id/textView7"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:paddingLeft="5dp"
        android:text="7" />
</TableRow>

<TableRow
    android:id="@+id/tableRow8"
    android:layout_width="match_parent"
    android:layout_height="40dp"
    android:layout_weight="1"
    android:background="@drawable/border" >

    <TextView
        android:id="@+id/textView8"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:paddingLeft="5dp"
        android:text="8" />
</TableRow>

<TableRow
    android:id="@+id/tableRow9"
    android:layout_width="match_parent"
    android:layout_height="40dp"
    android:layout_weight="1"
    android:background="@drawable/border" >

    <TextView
        android:id="@+id/textView9"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:paddingLeft="5dp"
        android:text="9" />
</TableRow>

<TableRow
    android:id="@+id/tableRow10"
    android:layout_width="match_parent"
    android:layout_height="40dp"
    android:layout_weight="1"
    android:background="@drawable/border" >

    <TextView
        android:id="@+id/textView10"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:paddingLeft="5dp"
        android:text="10" />
</TableRow>

<TableRow
    android:id="@+id/tableRow11"
    android:layout_width="match_parent"
    android:layout_height="40dp"
    android:layout_weight="1"
    android:background="@drawable/border" >

    <TextView
        android:id="@+id/textView11"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:paddingLeft="5dp"
        android:text="11" />
</TableRow>

<TableRow
    android:id="@+id/tableRow12"
    android:layout_width="match_parent"
    android:layout_height="40dp"
    android:layout_weight="1"
    android:background="@drawable/border" >

    <TextView
        android:id="@+id/textView12"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:paddingLeft="5dp"
        android:text="12" />
</TableRow>

<TableRow
    android:id="@+id/tableRow13"
    android:layout_width="match_parent"
    android:layout_height="40dp"
    android:layout_weight="1"
    android:background="@drawable/border" >

    <TextView
        android:id="@+id/textView13"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:paddingLeft="5dp"
        android:text="13" />
</TableRow>

<TableRow
    android:id="@+id/tableRow14"
    android:layout_width="match_parent"
    android:layout_height="40dp"
    android:layout_weight="1"
    android:background="@drawable/border" >

    <TextView
        android:id="@+id/textView14"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:paddingLeft="5dp"
        android:text="14" />
</TableRow>

<TableRow
    android:id="@+id/tableRow15"
    android:layout_width="match_parent"
    android:layout_height="40dp"
    android:layout_weight="1"
    android:background="@drawable/border" >

    <TextView
        android:id="@+id/textView15"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:paddingLeft="5dp"
        android:text="15" />
</TableRow>

<TableRow
    android:id="@+id/tableRow16"
    android:layout_width="match_parent"
    android:layout_height="40dp"
    android:layout_weight="1"
    android:background="@drawable/border" >

    <TextView
        android:id="@+id/textView16"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:paddingLeft="5dp"
        android:text="16" />
</TableRow>

私の問題は、ボタン、テキストビュー、ビューなどを使用するかどうかわからないことです...ボタンを使用すると、他のテーブル行が小さくなり、読めなくなります... :(

助けてください、よろしくお願いします!:)

4

0 に答える 0