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. a/v sync in mediarecorder

Hi,
Anybody can shed light on where I can find a/v sync code in PVMediaRecorder?
I find in opencore/android/ that audio input takes audio sample number as
its time stamp while camera input takes OsclTickCount offset for a
reference. Is there supposed to be a synchronization on these 2 clocks just
like what it is in player? If not, is it meant to be 2 seperate clocking in
PV?

-- 
Thanks,
Andy

--~--~---------~--~----~------------~-------~--~----~

2. the market for profit is open!!

woopee
--~--~---------~--~----~------------~-------~--~----~

3. IM doesn't stay signed in

4. help to start simulator that built by myself

5. Good App. Ideas for Developers!!

6. Why didn't google provide APIs for desktop widgets?

7. FYI: JRuby and Rhino coming to Android