I also managed to use the android:label just by accessing ActivityInfo
programatically, I just want to guarantee no resources are wasted and
no additional layouts are inflated for no need.

On Oct 12, 1:27 pm, Kumar Bibek <[email protected]> wrote:
> Yes, you cannot do that without having to pick up the value from the
> manifest and setting it to the title. Once you mention that you are using a
> custom title, the default things don't work. It thinks that you will set a
> custom title yourself, so it doesn't do it.
>
>
>
>
>
> On Wed, Oct 13, 2010 at 1:54 AM, Dimitris <[email protected]> wrote:
> > That should work so you are saying there is no way for me to use
> > android:label from the manifest...correct?
>
> > On Oct 12, 1:09 pm, Kumar Bibek <[email protected]> wrote:
> > > Well, the problem with this approach is that it is not FOOL PROOF. I dont
> > > think it's mentioned anywhere in the Docs that the title bar would always
> > > contain a texview with this id.
>
> > > So, the best bet I would suggest is go for a theme with no default title,
> > > and add a custom view which looks like a title. You will then have full
> > > control over it.
>
> > > On Wed, Oct 13, 2010 at 1:23 AM, Dimitris <[email protected]> wrote:
> > > > I use in onCreate():
>
> > > > requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
> > > >                super.onCreate(savedInstanceState);
>
> > > >                setContentView(getContentView());
>
> > > >                getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE,
> > > > R.layout.title_bar_1);
>
> > > > And then I have an XML layout for the title. I know it works cause I
> > > > also have an imageview in it and I can see it. However my TextView
> > > > does not get the value from android:label, how can I do that?
>
> > > > Thanks.
>
> > > > On Oct 12, 12:16 pm, Kumar Bibek <[email protected]> wrote:
> > > > > How are you setting the title bar then? You set your own layout to
> > it?
>
> > > > > On Wed, Oct 13, 2010 at 12:13 AM, Dimitris <[email protected]>
> > wrote:
> > > > > > I have a custom title bar that I would like to apply to all my
> > > > > > activities. I have searched online and found a few ways of doing
> > that
> > > > > > however I have ran into a problem.
>
> > > > > > It seems that despite the fact I have a TextView in my titlebar
> > with
> > > > > > id @android:id/title, Android will not use the value defined in the
> > > > > > manifest in android:label for each activity.
>
> > > > > > I tried also calling setTitle(R.string.myTitle) but it still will
> > not
> > > > > > render it! If I manually put some text in my TextView in the xml it
> > > > > > shows up fine.
>
> > > > > > How can I have a custom title bar that is linked and makes Android
> > use
> > > > > > my manifest values for labels? I do not want to lose the setTitle()
> > or
> > > > > > the XML attributes functionality.
>
> > > > > > Thanks.
>
> > > > > > p.s I would like to avoid embedding the title as a view in my
> > layout
> > > > > > and use FEATURE_NO_TITLE. I do not want to do that.
>
> > > > > > --
> > > > > > 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]<android-developers%2Bunsubs
> > > > > >  [email protected]><android-developers%2Bunsubs
> > [email protected]><android-developers%2Bunsubs
> > > > [email protected]>
> > > > > > For more options, visit this group at
> > > > > >http://groups.google.com/group/android-developers?hl=en
>
> > > > > --
> > > > > Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com
>
> > > > --
> > > > 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]<android-developers%2Bunsubs
> > > >  [email protected]><android-developers%2Bunsubs
> > [email protected]>
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/android-developers?hl=en
>
> > > --
> > > Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com
>
> > --
> > 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]<android-developers%2Bunsubs 
> > [email protected]>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com

-- 
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

Reply via email to