How to reference another GUI xml from within a GUI xml?

by Mariano Kamp » Sat, 27 Dec 2008 07:06:17 GMT


Sponsored Links
 Hi,

   let's consider this: You have a list view that shows all emails in  
your mailbox, but just their subject and from information. When you  
click on a list item to launch an activity that shows the full mail.  
The latter view also contains the same subject and from information,  
rendered the same way as in the list view (e.g. the subject is bold  
when the mail is unread).

   How to do that in a sane way? Let's define a mail_row.xml with two  
TextViews that represent the subject and from. So far so good, but how  
can I re-use this description in the email_full.xml to prevent  
duplication?

   Any ideas? If there isn't any sane way to do that, what would be  
the closest thing? A custom view?

Cheers,
Mariano

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



How to reference another GUI xml from within a GUI xml?

by Mark Murphy » Sat, 27 Dec 2008 07:25:44 GMT


 


I think <merge> or <include> will work, though I haven't experimented
with either as yet.

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com 
_The Busy Coder's Guide to Android Development_ Version 1.9 Available!

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


Sponsored Links


How to reference another GUI xml from within a GUI xml?

by Mariano Kamp » Sat, 27 Dec 2008 20:30:16 GMT


 Thank you Marc.

That was it. <include> worked fine.

Cheers,
Mariano






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



How to reference another GUI xml from within a GUI xml?

by Mariano Kamp » Sat, 27 Dec 2008 21:37:28 GMT


 Thank you Marc.

That was it. <include> worked fine.



On Sat, Dec 27, 2008 at 12:25 AM, Mark Murphy  





 >    let's consider this: You have a list view that shows all emails in
 > your mailbox, but just their subject and from information. When you
 > click on a list item to launch an activity that shows the full mail.
 > The latter view also contains the same subject and from information,
 > rendered the same way as in the list view (e.g. the subject is bold
 > when the mail is unread).
 >
 >    How to do that in a sane way? Let's define a mail_row.xml with two
 > TextViews that represent the subject and from. So far so good, but  
how
 > can I re-use this description in the email_full.xml to prevent
 > duplication?

I think <merge> or <include> will work, though I haven't experimented
with either as yet.

--
Mark Murphy (a Commons Guy)
 http://commonsware.com 
_The Busy Coder's Guide to Android Development_ Version 1.9 Available!




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



Other Threads

1. Samsung Galaxy Tab "Verizon" Update, But No Honeycomb

Wah Samsung Galaxy Tab dapet update lagi nih

Sumber : http://thedroidguy.com/2011/04/galaxy-tab-update-but-no-honeycomb/

-- 
===============

2. Email di android

Selamat siang suhu2, mohon petunjuk apabila kita mempunyai bnyk account email 
dan untuk mengordinir biar jd 1 folder, cukup pake folder mail dr android atau 
pake applikasi apa ya? Apakah sprt K9 mail? Atau ada yg lebih bagus?

Trima kasih,
Sent from my BlackBerry smartphone from Sinyal Bagus XL, Nyambung Teruuusss...!

-- 
===============

3. Nubie tanya aplikasi bayar

4. Bluetooth pairing with Android 2.3 and using insecure RFCOMM sockets

5. How to install an app on android phone by using eclipse

6. Programatically unchecking items in a dialog

7. Regarding Video Audio Problem...