It is being displayed. The second layout file is for a list item with
multiple details for a ListView that is found in the first parent layout
file....

For example the list item layout file is as follows......

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
  xmlns:android="http://schemas.android.com/apk/res/android";
  android:layout_width="fill_parent"
  android:layout_height="wrap_content"
  android:orientation="vertical">

  <LinearLayout
  xmlns:android="http://schemas.android.com/apk/res/android";
  android:layout_width="fill_parent"
  android:layout_height="wrap_content"
  android:orientation="horizontal">

  <TextView android:layout_width="180dp"
  android:layout_height="wrap_content"
  android:id="@+id/categoryNameView"
  android:textSize="16px"
  android:paddingRight="30dp"
  android:textColor="#000000"
  ></TextView>


  <LinearLayout
  xmlns:android="http://schemas.android.com/apk/res/android";
  android:layout_width="100dp"
  android:layout_height="wrap_content"
  android:orientation="horizontal"
  android:gravity="right"
  android:paddingRight="0dp">

  <TextView android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:id="@+id/currency"
  android:text=""
  android:textSize="14px"
  android:paddingLeft="10dp"
  android:textColor="#d17375"
  ></TextView>

  <TextView android:layout_width="90dp"
  android:layout_height="wrap_content"
  android:id="@+id/amountView"
  android:textSize="14px"
  android:textStyle="bold"
  android:textColor="#d17375"
  ></TextView>

  </LinearLayout>

  </LinearLayout>

  <LinearLayout
  xmlns:android="http://schemas.android.com/apk/res/android";
  android:layout_width="fill_parent"
  android:layout_height="wrap_content"
  android:orientation="horizontal">

  <TextView android:layout_width="fill_parent"
  android:layout_height="wrap_content"
  android:id="@+id/dataView"
  android:layout_weight="1"
  android:textColor="#000000"></TextView>

  <TextView android:layout_width="fill_parent"
  android:layout_height="wrap_content"
  android:id="@+id/placeView"
  android:layout_weight="1"
  android:textColor="#000000"></TextView>

  </LinearLayout>

</LinearLayout>

This is used for the listView in the date_list_layout xml file as
follows.....

 <ListView android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:id="@+id/DisplayDateList"
             android:cacheColorHint="#00000000"
             android:divider = "@drawable/horizontalline">
            </ListView>

It is populated from a database in the activity as follows.......

mCursor = mDb.query("incometracker", null,
                "year_id=? AND month_id=? AND day_id=?", new String[] {
                year1, month1, day1},
                null, null,  "_id ASC");

        startManagingCursor(mCursor);

        int view[] = {R.id.categoryNameView, R.id.dataView, R.id.placeView,
R.id.amountView};
        String col[] = { "income_name", "date", "place", "amount"};

        SimpleCursorAdapter ca = new SimpleCursorAdapter(
                this, R.layout.display_item, mCursor, col, view);

But my problem is that there is one more TextView that is found within each
list item that needs to be filled from an input from the user and not the
database

On 17 July 2011 07:05, TreKing <[email protected]> wrote:

> On Sat, Jul 16, 2011 at 11:40 AM, Árón <[email protected]> wrote:
>
>> I know I would usually use the code below but this is not working as the
>> R.id.currency TextView is not in the main R.layout.date_list_layout....
>>
>
> What is the point of setting the text on a TextView that is not presently
> being displayed?
>
>
> -------------------------------------------------------------------------------------------------
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> transit tracking app for Android-powered devices
>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Aaron Mulhall
APPIDAE
Developer
Interaction Design Centre, CSIS Dept.
Engineering Research Building
University of Limerick
+353 0862151535
www.appidae.com

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to