Two simple questions about android:label in AndroidManifest

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Two simple questions about android:label in AndroidManifest

Postby E-Nature » Fri Jan 01, 2010 9:06 pm

Sorry, me again :)

I just have two probably easy questions about the android:label in the AndroidManifest.xml file.

1.) How can I disable (make invisible) this gray bar (android:label) in a View?

2.) How can I set the text for that in the Java Code (and not in the Manifest file itself)?

Thank you :D
User avatar
E-Nature
Experienced Developer
Experienced Developer
 
Posts: 93
Joined: Mon Nov 16, 2009 3:39 pm

Top

Postby jwei512 » Fri Jan 01, 2010 9:52 pm

In the manifest it looks like:

Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1.  
  2.     <application android:icon="@drawable/icon" android:label="@string/app_name"
  3.  
  4.         android:theme="@android:style/Theme.NoTitleBar" >
  5.  
  6.  
Parsed in 0.001 seconds, using GeSHi 1.0.8.4


And in JAVA it looks like:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  
  2. requestWindowFeature(Window.FEATURE_NO_TITLE);
  3.  
  4.  
Parsed in 0.029 seconds, using GeSHi 1.0.8.4


Hope this is what you were asking about...
- jwei

http://thinkandroid.wordpress.com
Examples, Code, and Tutorials
jwei512
Senior Developer
Senior Developer
 
Posts: 135
Joined: Mon Jul 27, 2009 9:35 pm
Location: Palo Alto, CA

Postby E-Nature » Sat Jan 02, 2010 3:33 pm

yeah it was, thanks 8)

what I also was looking for was to set the title directly in the Java code. The solution for that is:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. setTitle("Some window title");
  2.  
  3.  
Parsed in 0.030 seconds, using GeSHi 1.0.8.4
User avatar
E-Nature
Experienced Developer
Experienced Developer
 
Posts: 93
Joined: Mon Nov 16, 2009 3:39 pm

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 7 guests