Вид сетки в андроид - PullRequest
       1

Вид сетки в андроид

0 голосов
/ 06 апреля 2011

мой xml ниже, если установить изображение в виде сетки, та временная таблица, которая прикреплена снизу, не отображается на экране.Пожалуйста, дайте мне решение

        android:layout_height="wrap_content">
        <ImageView android:id="@+id/matches" android:layout_width="wrap_content"
            android:layout_height="wrap_content" 
            android:src="@drawable/matches"
            android:focusable="true" 
            android:focusableInTouchMode="true" android:scaleType="center">
        </ImageView>
        <ImageView android:id="@+id/matches" android:layout_width="wrap_content"
            android:layout_height="wrap_content" 
            android:src="@drawable/news"

            android:focusable="true" 
            android:focusableInTouchMode="true" android:scaleType="center">
        </ImageView>
        <ImageView android:id="@+id/matches" android:layout_width="wrap_content"
            android:layout_height="wrap_content" 
            android:src="@drawable/pavilion"
            android:focusable="true" 
            android:focusableInTouchMode="true" android:scaleType="center">
        </ImageView>

    </TableRow>
</TableLayout>
<ImageView 
          android:id="@+id/adv_view"
          android:textStyle="bold"
      android:src="@drawable/hindustantimeslogo"
      android:layout_below="@+id/top_tab"
      android:scaleType="center"
      android:layout_height="wrap_content"
          android:layout_width="fill_parent">
</ImageView>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:id="@+id/grid_view_container"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/adv_view"
>
    <GridView
android:id="@+id/gridview"
android:layout_width="fill_parent"
android:layout_height="wrap_content"

android:columnWidth="90dp"
android:numColumns="auto_fit"
android:verticalSpacing="10dp"
android:horizontalSpacing="10dp"
android:stretchMode="columnWidth"
android:gravity="center_horizontal">

</GridView>   
</RelativeLayout>
<TableLayout android:id="@+id/bottom_tab"
    android:layout_width="fill_parent" android:layout_height="40dip"
    android:layout_below="@+id/grid_view_container"
    android:gravity="bottom"
    android:stretchColumns="*" android:layout_alignParentBottom="true">
    <TableRow android:layout_width="fill_parent" android:id="@+id/showtab"
         android:layout_height="wrap_content" >
        <ImageView android:id="@+id/right_now" android:layout_width="wrap_content"
            android:layout_height="wrap_content" 
            android:scaleType="fitCenter"
             android:focusable="true" android:src="@drawable/matches" android:focusableInTouchMode="true"

            >
        </ImageView>
        <ImageView android:id="@+id/in_cinemas" android:layout_width="wrap_content"
            android:layout_height="wrap_content" 
            android:scaleType="fitCenter"
            android:focusable="true" android:src="@drawable/matches" android:focusableInTouchMode="true"

            >
        </ImageView>

        <ImageView android:id="@+id/pre_book"
            android:layout_width="wrap_content" android:layout_height="wrap_content"
            android:scaleType="fitCenter"
             android:focusable="true" android:src="@drawable/news" android:focusableInTouchMode="true"

            >
        </ImageView>

        <ImageView android:id="@+id/upcoming" android:layout_width="wrap_content"
            android:layout_height="wrap_content" 
            android:scaleType="fitCenter"
            android:focusable="true" android:src="@drawable/news" android:focusableInTouchMode="true"


            >
        </ImageView>
         <ImageView android:id="@+id/more" android:layout_width="wrap_content"
            android:layout_height="wrap_content" 
            android:scaleType="fitCenter"
            android:focusable="true" android:src="@drawable/news" android:focusableInTouchMode="true"


            >
        </ImageView>
    </TableRow>
</TableLayout>

Ответы [ 2 ]

0 голосов
/ 06 апреля 2011

Вы должны использовать компонент scrollview и поместить в него сетку. http://developer.android.com/reference/android/widget/ScrollView.html

0 голосов
/ 06 апреля 2011
android:layout_alignParentBottom="true"
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...