And how you can create such component?
On 4/10/08, Pepel <[EMAIL PROTECTED]> wrote:
>
> And how you can create such comonent???
>
> regards,
>
>
> On 4/1/08, Axel M. Garcia <[EMAIL PROTECTED]> wrote:
> >
> >
> > Why to have two listViews?
> > If I can suggest, I think this way is simpler:
> > you can try to do it by creating a component composed by the item +
> > the button or whatever, and then add the component to the ListView.
> >
> > I mean:
> > (ListView)
> > (Item1 [Add][Text link][TextLink])
> > (Item2) [Add]...)
> > ..
> >
> >
> >
> >
> >
> > On Apr 1, 10:16 am, Gazpacho <[EMAIL PROTECTED]> wrote:
> > > Thanks! I have a followup question: is there a way to make the second
> > > list remain aligned with the first list as we scroll down? I'm trying
> > > to make the second list comprise of a set of buttons or text links
> > > that would be associated with each item in the first list?
> > >
> > > So like this:
> > >
> > > (ListView 1) (ListView 2)
> > > Item 1 [Add]
> > > Item 2 [Add]
> > > Item 3 [Add]
> > >
> > > Is this possible with Android?
> > >
> > > Thanks again!
> > >
> > > On Mar 31, 10:26 pm, "Dan U." <[EMAIL PROTECTED]> wrote:
> > >
> > > > The id problem would be that you try to define list2 as being an id
> > > > provided by android itself (@android:id) but it doesn't exist. It's
> > > > not something you just make up.
> > >
> > > > What I did to make your example work was to change list2 to be
> > > > android:id="@+id/list2"
> > > > Then for testing, here's how I set the adapters...
> > >
> > > > String[] mStrings = new String[] { "a", "b", "c" };
> > > > setListAdapter(new ArrayAdapter<String>(this,
> > > > android.R.layout.simple_list_item_1,
> > mStrings));
> > >
> > > > String[] mStrings2 = new String[] { "d", "e", "f" };
> > > > ListView secondList = (ListView)
> > findViewById(R.id.list2);
> > > > secondList.setAdapter(new ArrayAdapter<String>(this,
> > > > android.R.layout.simple_list_item_1,
> > mStrings2));
> > >
> > > > Note the first setListAdapter is set up to interact with the first
> > > > ListView in my ListActivity.
> > >
> > > > On Mar 31, 10:07 pm, Gazpacho <[EMAIL PROTECTED]> wrote:
> > >
> > > > > I'd like to create two columns of ListViews in Android. Is this
> > > > > possible?
> > >
> > > > > This is giving me errors with the id naming:
> > >
> > > > > <?xml version="1.0" encoding="utf-8"?>
> > > > > <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/
> > > > > android"
> > > > > android:layout_width="fill_parent"
> > > > >
> > android:layout_height="fill_parent">
> > >
> > > > > <ListView android:id="@android:id/list"
> > > > > android:layout_width="100px"
> > > > > android:layout_height="fill_parent" />
> > >
> > > > > <ListView android:id="@android:id/list2"
> > > > > android:layout_toRight="@android:id/list"
> > > > > android:layout_width="100px"
> > > > > android:layout_height="fill_parent" />
> > > > > </RelativeLayout>
> > > >
> >
>
>
> --
> Pepel
--
Pepel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---