Layout not displayed properly while loading Listview dynamically?

by javame_android » Thu, 22 Apr 2010 17:48:19 GMT


Sponsored Links
 Hi,

I am trying to laod the listview dynamically. There are three
textviews inside a listview. The text to be set in the textview is
fetched from the server. All this is working fine. I am able to fetch
the text and am able to display it inside the listview.

The only problem is the position of the textview. The xml layout file
is as under :

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android=" http://schemas.android.com/apk/res/ 
android"
        android:id="@+id/listViewShow"
    android:layout_width="fill_parent"
    android:layout_height="?android:attr/listPreferredItemHeight"
    android:background="@drawable/brown_bg"
    android:padding = "3dip">

    <TextView
        android:id = "@+id/txtBabbleListTitle"
                android:layout_width = "wrap_content"
                android:layout_height = "wrap_content"
                android:textColor = "#000000"
                android:text = "Hello">
    </TextView>

    <RelativeLayout
        android:layout_width = "wrap_content"
        android:layout_height = "wrap_content">

        <TextView
                android:id = "@+id/txtBabbleDateTime"
                        android:layout_width = "wrap_content"
                        android:layout_height = "wrap_content"
                        android:layout_alignParentBottom = "true"
                        android:textColor = "#000000"
                        android:text = "Hello" >
        </TextView>
    </RelativeLayout>

    <TextView
        android:id = "@+id/txtBabbleTotalReplies"
        android:layout_width = "wrap_content"
                android:layout_height = "wrap_content"
                android:layout_alignParentRight = "true"
                android:textColor = "#000000"
                android:text = "(7)">
    </TextView>

</RelativeLayout>

If I look at this xml layout in the eclipse layout tab then it is
displayed properly. Problem occurs only when the text is fetched
dynamically.

Can some one let me know the issue?


Thanks & Regards
Sunil

--



Layout not displayed properly while loading Listview dynamically?

by javame_android » Thu, 22 Apr 2010 21:13:04 GMT


 Hi,

It is solved now.

I was inflating the row.xml in a wrong way.


Regards
Sunil

--


Sponsored Links


Other Threads

1. UltimateFaves

Maaf nubi.
Pasar pagi d mana?

-- 
"Indonesian Android Community [id-android]" 

2. Penampakan Samsung Galaxy S

Bayu 
Balita tajir kah?


Ch 
sent by onix bin odin

-----Original Message-----
From: "yopie suryadi" <yo...@anjroid.net>
Sender: id-android@googlegroups.com
Date: Sun, 27 Jun 2010 05:37:14 
To: Idandroid<id-android@googlegroups.com>
Reply-To: id-android@googlegroups.com
Subject: [id-android] Penampakan Samsung Galaxy S

Ternyata bayu udah pake....
Prikitiw...


@yopiesuryadi
www.jeruknipis.com/forum

-- 
"Indonesian Android Community [id-android]" 

3. OOT: mohon ganti password gmail anda

4. Voice Recognition Libraries - Open Source?

5. Mapping Multiple textures to a cube in Android OpenGL ES

6. OOT paging Abangkis mw tanya seputar badminton

7. Android SDK and Helios - compatibility problems?