[Forward] android Interface: Activity of the Title Set
Advertisements
android Interface: Activity of the Title Set
Articles Category: Mobile Development
1, change the subject content: public void setTitle ( CharSequence title)
2, Hide Title: requestWindowFeature (Window.FEATURE_NO_TITLE);
3, hide the title and the top bar battery and signal (full screen):
Java code
- public void setFullscreen () (
- requestWindowFeature (Window.FEATURE_NO_TITLE);
- getWindow (). setFlags (WindowManager.LayoutParams.FLAG_FULLSCREEN,
- WindowManager.LayoutParams.FLAG_FULLSCREEN);
- )
public void setFullscreen() {
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
4 Custom Title:
Java code
- protected void onCreate (Bundle savedInstanceState) (
- super. onCreate (savedInstanceState);
- / / Pre-set to allow to change the window state, be called before the setContentView, or set the title throw run-time error.
- requestWindowFeature (Window.FEATURE_CUSTOM_TITLE);
- setContentView (R.layout.custom_title);
- / / Header area can be set for the layout, so you can display rich way
- getWindow (). setFeatureInt (Window.FEATURE_CUSTOM_TITLE,
- R.layout.custom_title_1);
- )
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Preset allows you to change the window state, required in setContentView Before calling, or else set the title throw a run-time error .
requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
setContentView(R.layout.custom_title);
// The header area can be set to a layout, so you can have rich show way
getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE,
R.layout.custom_title_1);
}
res \ layout \ custom_title_1.xml contains a TextView to display the title. Android can be used as a title to show the layout, with good scalability.
Java code
- <RelativeLayout xmlns: android = "http://schemas.android.com/apk/res/android" android: id = "@ + id / screen"
- android: layout_width = "fill_parent" android: layout_height = "fill_parent"
- android: orientation = "vertical">
- <TextView android: id = "@ + id / left_text"
- android: layout_width = "wrap_content"
- android: layout_height = "wrap_content"
- android: layout_alignParentLeft = "true"
- android: text = "@ string / custom_title_left" />
- </ RelativeLayout>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/screen"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:orientation="vertical">
<TextView android:id="@+id/left_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:text="@string/custom_title_left" />
</RelativeLayout>
Related Posts of [Forward] android Interface: Activity of the Title Set
-
jboss ejb3 Message Driven Bean
Super Medium ejb hate. . . . . . . . . . . . . . . . . . . ================================================ To configure a Message Driven Bean in a different application server parameters are not the same. Currently only passed the test jboss. Message Dri
-
Dynamic loading JS script four kinds of methods
To achieve dynamic loading JS script has four kinds of methods: 1, direct document.write <script language="javascript"> document.write ( "<script src='test.js'> <\ / script>"); </ script> 2, dynamic scri
-
FLEX: integrating Spring + Hibernate
Before a friend also wanted to study development of FLEX. Asked me to help him to be a small sample. Spent a weekend time, to integrate a sampleproject. Client: FLEX Server: Spring2.5 + Hibernate3.2 + Hibernate-annotations3.3.1 + MySQL5 FDS: BlazeDS3 IDE:
-
spring + hibernate + oracle9i to read and write CLOB
Database-driven update classes12-9i.jar Hibernate modify the configuration of the following code <bean/> <bean Lazy-init="true"> <property name="nativeJdbcExtractor"> <ref local="nativejdbcExtractor"/>
-
Process migration from tomcat to websphere changes
Process migration from tomcat to websphere changes Because customers use the web application server software used by different what tomcat5, tomcat6, websphere5.1, websphere6.1, weblogic8, and so on, and the software used inconsistent standards, ibm's
-
myeclipse plugin
myeclipsePlug-ins? 1.tomcatPlugin(Start tomcat ):http ://www.sysdeo.com/eclipse/tomcatPlugin.html,2.xVersions of eclipse 3 version 2 .1Version doesn't work. 2.Lomboz(Development of jsp program ,jspDynamic prompt, debugging ):http://forge.objectweb.org/pro
-
hibernate generic generic DAO
package org.lzpeng.dao; import java.io.Serializable; import java.util.List; import org.hibernate.Criteria; import org.hibernate.Query; import org.hibernate.criterion.Criterion; import org.springside.modules.orm.hibernate.Page; /** * * @version 2009-1-10 *
-
The level Hibernate cache
Hibernate cache level: (1) a cache is very short and the session life cycle consistent, also known as session-level cache-level cache or transaction-level cache (2) Ways of Supporting level cache: get (); load (); iterator (); only entity object cach ...












