GridView Issue

by Landy » Sat, 03 Jul 2010 15:06:20 GMT


Sponsored Links
 I am trying to show a textview below the gridview but it doesnt seem
to work.
The textview never appears.
Below is the code i am using. Please suggest me how to use a TextView
below the GridView.

<LinearLayout xmlns:android=" http://schemas.android.com/apk/res/ 
android"
android:orientation="vertical"
android:background="@drawable/blue"
android:layout_width="fill_parent"
android:layout_height="wrap_content">

<LinearLayout
android:orientation="vertical"
android:background="@drawable/red"
android:layout_width="fill_parent"
android:layout_height="wrap_content">

<GridView

android:id="@+id/myGrid"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="10dp"
android:verticalSpacing="10dp"

android:horizontalSpacing="10dp"
android:numColumns="auto_fit"
android:columnWidth="60dp"
android:stretchMode="columnWidth"

android:gravity="center"
/>
</LinearLayout>

<TextView
android:background="@drawable/box"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/linear_layout_1_top"/>

</LinearLayout>

Thanks,
Lardy

--



Other Threads

1. How to stop a service, when all activities are finished?

Hi!

I am programming a game. I have a service for the background-music.
When I press the home-button and leave my activities, the service
still runs in background. How can I stop the service, when there is no
more visible activity in my program and restart it, when the user goes
back to my game (some activity of it)?

Greetings, Martin

-- 

2. version compatibility

Hello,

If I develop an application on android sdk 1.1, is it sure that this
application will work on any newer version (sdk 1.6, 2.1, ...) ?
Because sometimes there are deprecated methods on newer version !

--

3. Android Developers Unite to Help Haiti

4. I want to get running app status how to do?

5. Active buttons in notification bar

6. HowTO rectangular-box around URL on a page ?

7. loading a gridview with XML data