APIDEMO ACTIVITY 窗口Window标题的设置

来源:互联网 发布:南京少儿编程培训机构 编辑:程序博客网 时间:2024/05/22 00:51

 requestWindowFeature(Window.FEATURE_CUSTOM_TITLE); //请求
        setContentView(R.layout.custom_title);
        getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.custom_title_1); //设置,

前请求然后才能设置。

featureid 有:

 

intDEFAULT_FEATURESThe default features enabled intFEATURE_CONTEXT_MENUFlag for the context menu.intFEATURE_CUSTOM_TITLEFlag for custom title.intFEATURE_INDETERMINATE_PROGRESSFlag for indeterminate progress intFEATURE_LEFT_ICONFlag for having an icon on the left side of the title bar intFEATURE_NO_TITLEFlag for the "no title" feature, turning off the title at the top of the screen.intFEATURE_OPTIONS_PANELFlag for the "options panel" feature.intFEATURE_PROGRESSFlag for the progress indicator feature intFEATURE_RIGHT_ICONFlag for having an icon on the right side of the title bar intID_ANDROID_CONTENTThe ID that the main layout in the XML layout file should have.intPROGRESS_ENDEnding value for the (primary) progress intPROGRESS_INDETERMINATE_OFFFlag for setting the progress bar's indeterminate mode off intPROGRESS_INDETERMINATE_ONFlag for setting the progress bar's indeterminate mode on intPROGRESS_SECONDARY_ENDHighest possible value for the secondary progress intPROGRESS_SECONDARY_STARTLowest possible value for the secondary progress intPROGRESS_STARTStarting value for the (primary) progress intPROGRESS_VISIBILITY_OFFFlag for setting the progress bar's visibility to GONE intPROGRESS_VISIBILITY_ONFlag for setting the progress bar's visibility to VISIBLE
原创粉丝点击