It won't make much of a difference. I prefer the second approach because it doesn't involve extra code and is thus easier to maintain.
On Wed, May 13, 2009 at 11:21 PM, Guru <[email protected]> wrote: > > I have question on what is the best approch to take.I have a header view in > all my screens of the app. > > So is it best to have the setContent of the header view and then adding the > views by inflating them in the sub-class activity as below > > Base extends Activity{ > > private Linearlayout mHeader; > public void onCreate(Bundle b){ > setContentView(R.layout.header); > > mHeader = (LinearLayout)findViewById(R.id.myheader); > } > > } > > MyView extends Base{ > public void onCreate(Bundle b){ > m_Inflater = LayoutInflater.from(this); > ViewGroup layout = (ViewGroup) > m_Inflater.inflate(R.layout.actual_layout, > mHeader ); > } > > } > > Or is it ideal to have the include tag in the xmls and setContentView at > once. > -- > Thanks and Regards > Gurudutt P.S. > > > > -- Romain Guy Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

