Stacking a ListView with other widgets below?

by Romain Guy » Sat, 14 Nov 2009 07:13:49 GMT


Sponsored Links
 Don't use a ScrollView, it won't work. Add footers to your ListView.



>



Stacking a ListView with other widgets below?

by Mark Wyszomierski » Sat, 14 Nov 2009 07:27:35 GMT


 Hi Romain,

If I use a footer view, it can get focus, but its internal controls
cannot be focused using the scroll ball? For example, this is a simple
footer view:

  LinearLayout llFooter = new LinearLayout(this);
  llFooter.setLayoutParams(new AbsListView.LayoutParams
(AbsListView.LayoutParams.FILL_PARENT,
AbsListView.LayoutParams.WRAP_CONTENT));

   Button btn1 = new Button(this);
   btn1.setText("Btn1");
   llFooter.addView(btn1);

When I use the scroll ball the navigate to the footer, the entire
background gets highlighted, and I cannot access the button on the
layout. Is there some way of doing that for a better user experience,
or do users just have to touch with their finger?

Thanks





> >


Sponsored Links


Stacking a ListView with other widgets below?

by Romain Guy » Sat, 14 Nov 2009 07:40:46 GMT


 When you add the footer to the listview you need to indicate it can
receive focus: 
 http://d.android.com/reference/android/widget/ListView.html #setItemsCanFocus(boolean)





>> >



Stacking a ListView with other widgets below?

by Mark Wyszomierski » Sat, 14 Nov 2009 07:53:01 GMT


 Romain, thanks, that saved me.






> >> >



Stacking a ListView with other widgets below?

by Mark Wyszomierski » Sun, 15 Nov 2009 02:08:26 GMT


 ne more question on this - it seems like if we use a header or footer
view - then our activity can not add any other views? Example:

<LinearLayout>
<ListView> // with header and footer views.
</LinearLayout>

the above works perfectly with focus getting routed correctly etc. The
focus acts strangely in this case though:

<LinearLayout>
<LinearLayout>
<Button>
</LinearLayout>
<ListView>
</LinearLayout>

if the list view has focusable items - then the focus jumps back up to
the top LinearLayout-button after hitting down key again. This is kind
of strange, should this be happening? To explain further:

<LinearLayout>
<LinearLayout>
<Button>
</LinearLayout>
<ListView>
// listview is composed of:
TextView
TextView
Button
TextView
</ListView>
</LinearLayout>

so focus is fine up until it hits the row with the Button. The button
gets highlighted (since itemsCanFocus=true), but then hitting the down
arrow key again jumps focus up to the top linear layout button,
instead of continuing focus to the next row of the ListView. Normally
I could just use a header view instead, but is there an undocumented
rule in which we cannot add other views to our layout if using a
ListView with setItemsCanFocus=true?

Thanks

On Nov 13, 6:52pm, Mark Wyszomierski <mar...@gmail.com> wrote:
> > >> >



Stacking a ListView with other widgets below?

by Mark Wyszomierski » Sun, 15 Nov 2009 04:03:04 GMT


 his is problem is probably related to this ListView bug:
http://code.google.com/p/android/issues/detail?id=4255#c2

On Nov 14, 1:07pm, Mark Wyszomierski <mar...@gmail.com> wrote:
> > > >> >



Other Threads

1. call flow through mydroid/hardware/ril/libril/ril.cpp.

Hi,

when We established call between 5554 and 5556 the socket connection
between two emulator is made in mydroid/hardware/ril/libril/ril.cpp.

how this connection established between two emulator? What is the
flow, can anyone tell me?

Ramesh

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

2. what is the picture format for Picture.WriteToStream?

bump





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

3. Call between two emulator

4. how to convert Picture object to Bitmap object?

5. Object encapsulating multiple views

6. SDK 1.1 view quicktime video on Android

7. How to prevent multiple instance of the same widget being added to the homescreen