I could throw in one more possible solution:
* Prepare one RelativeLayout for *each* possibility of visible and
gone objects, e.g.
one RelativeLayout to be used when there is only text and nothing
else,
one RelativeLayout when there is text and price
one RelativeLayout when there is priority, text, and note
etc.
Then when the list is built, select for each row dynamically the
layout based on the elements that need to be shown.
The main advantage is that this will work in all cases (because it can
be hand-tweaked for all cases), and it is fast (because one never
needs to nest layouts). (ok, one probably needs to manually keep track
of which RelativeLayouts have been used already, so that those objects
can be recycled when one scrolls the list - not a simple solution....)
The downside of this approach is that this does not scale well at all,
and with every new field, the number of RelativeLayouts doubles.
Devices get faster and faster, so I'd opt for the slower but more
easily maintainable solution of nesting LinearLayouts.
(Anyway the performance impact by changing layouts should scale with
the number of items visible on the screen, not with the total amount
of items in the database, so I think this is acceptable.)
Peli
On Dec 5, 6:24 am, aap <aa...@peromsik.net> wrote:
> GCI student Shuhao is working on issue 340<http://code.google.com/p/openintents/issues/detail?id=340&q=stack%3DS...>,
> and suggests that we revisit our complete reliance on RelativeLayout for
> the list item rows. I should have redirected our discussion to this forum
> hours ago, but better late then never I guess. Shuhao is considering using
> a LinearLayout within the RelativeLayout for the items which appear mostly
> on the first row of the RelativeLayout, meaning (I think) priority,
> quantity, item name, and has_note.
>
> The general consensus in various blog postings seems to be that putting
> LinearLayouts inside RelativeLayouts may not give the best performance. On
> the other hand it seems that our RelativeLayout is too complicated, leading
> to the note problem described in issue 340 but also some overlapping fields
> sometimes. There is a chance that the complexity of our RelativeLayout may
> be just as bad performance-wise as nesting a single LinearLayout would be.
> So Shuhao is going to give the LinearLayout a try and we will see whether
> the performance impact is an issue or not. If it does make things slow we
> might have to think some more about whether there is a way to fix the
> RelativeLayout without nesting a LinearLayout.
>
> The discussion so far can be found on the GCI task here<http://www.google-melange.com/gci/task/view/google/gci2011/7137283>
> one RelativeLayout when there is priority, text, and noteThat causes the original problem. As when text wraps, notes gets pushed off the screen.
--To view this discussion on the web visit https://groups.google.com/d/msg/openintents/-/SkpOuKzn2e0J.
You received this message because you are subscribed to the Google Groups "OpenIntents" group.
To post to this group, send email to openi...@googlegroups.com.
To unsubscribe from this group, send email to openintents...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/openintents?hl=en.
I tried to add priority, same thing, it also has notes
Shuhao
Sent from my phone.
--
You received this message because you are subscribed to the Google Groups "OpenIntents" group.
--
You received this message because you are subscribed to the Google Groups "OpenIntents" group.
To view this discussion on the web visit https://groups.google.com/d/msg/openintents/-/vt__thu047QJ.
Friedger
2011/12/13 Shuhao <ad...@thekks.net>:
> I don't think this note thing will work with a text view.. everytime it
> wraps.. everything disappears according to a couple of different tries.
>
> --
> You received this message because you are subscribed to the Google Groups
> "OpenIntents" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/openintents/-/ki69i46mAmkJ.
>
> To post to this group, send email to openi...@googlegroups.com.
> To unsubscribe from this group, send email to
> openintents...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/openintents?hl=en.
--
OpenIntents UG (haftungsbeschränkt)
Suarezstraße 41
14057 Berlin
tel:+49 30 60982220
mailto:in...@openintents.biz
enum:+493060982220
Vertretungsberechtigter Geschäftsführer: Friedger Müffke
Registergericht: Amtsgericht Berlin (Charlottenburg)
Registernummer: HRB 118597
Ust-IdNr: DE265992701
That's kind of what I did.
Shuhao
Sent from my phone.
--
You received this message because you are subscribed to the Google Groups "OpenIntents" group.
To view this discussion on the web visit https://groups.google.com/d/msg/openintents/-/9xsmeYtiPwcJ.