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. Get Attributes of a media file.

Hi,

I have downloaded a media file. (say mp3 file). I need to get the attributes
of the file, like ARTIST, TITLE etc.

Can anyone help me on this???

-- 
Regards,
Manjunatha

-- 

2. DisplayMetrics xdpi and ydpi returning incorrect values

This is a known bug. Although screenDPI=240 is the correct value (it's
not the real density of the display, but the density used by the OS
for that screen.)



> 

3. HttpServerConnection

4. cocos2d for Android Update

5. DisplayMetrics xdpi and ydpi returning incorrect values

6. how to add a new method in framework

7. How to upgrade OS in Google I/O Device to Android 2.1