English 中文(简体)
标题栏目中闪光的信号
原标题:Stop app name from flashing in title bar
  • 时间:2010-07-23 02:49:01
  •  标签:
  • android

我对我的工作做了一个习惯性的标题。 然而,当第一批装载时,在我的案文出现之前,用名称在标题栏中。 我如何阻止这种情况发生?

我在此主要活动中将我的习惯名称限定如下:

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
    setContentView(R.layout.main);
    getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.mytitle);

我的标题是xml,我写了我的文字:

<?xml version="1.0" encoding="utf-8"?>
 <TextView xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/myTitle"
    android:text="my text"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:gravity="center"
    android:textAppearance="?android:attr/textAppearance"
    />

我的称呼背景是 flash,只是案文。

感谢。

最佳回答

基本解释:在申请启动时,为了尽快对用户做出回应,安康首先展示了一个“审查”的窗口,甚至在启动程序时。 它这样做的办法是利用附录<代码>AndroidManifest.xml中的现有信息,并建立一个窗口,视之为表面上的空闲活动。 因此,你应在宣言中把这个主题确定为尽可能与你的实际倡议相匹配的东西。

就习俗所有权而言,你可以做些什么,因为贵方的称号取决于你们的实际守则,而你们的法典也没有运行。 您最能做的是:android:theme="@android:e/Theme.NoTitle Bar。 因此,预约窗口试图在你的活动中显示任何所有权限制......当然,你需要通过打电话<条码>加以澄清。 主题(Rodid.R.et.Theme),以回溯到违约主题。

仅就<代码>中的哪里拟订一个参照标准。 因此需要:

<application 
    android:label="@string/app_name"
    android:theme="@android:style/Theme.NoTitleBar" >
问题回答

另一种解决办法可以是:

android:label=”

在Manifest案的所有活动中。

在你确定主要内容之前,你可以尝试首先确定标题。

public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
  getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.mytitle);
  setContentView(R.layout.main);




相关问题
Android - ListView fling gesture triggers context menu

I m relatively new to Android development. I m developing an app with a ListView. I ve followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, ...

AsyncTask and error handling on Android

I m converting my code from using Handler to AsyncTask. The latter is great at what it does - asynchronous updates and handling of results in the main UI thread. What s unclear to me is how to handle ...

Android intent filter for a particular file extension?

I want to be able to download a file with a particular extension from the net, and have it passed to my application to deal with it, but I haven t been able to figure out the intent filter. The ...

Android & Web: What is the equivalent style for the web?

I am quite impressed by the workflow I follow when developing Android applications: Define a layout in an xml file and then write all the code in a code-behind style. Is there an equivalent style for ...

TiledLayer equivalent in Android [duplicate]

To draw landscapes, backgrounds with patterns etc, we used TiledLayer in J2ME. Is there an android counterpart for that. Does android provide an option to set such tiled patterns in the layout XML?

Using Repo with Msysgit

When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error: /c/Users/Andrew Rabon/bin/repo: line ...

Android "single top" launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would ...

From Web Development to Android Development

I have pretty good skills in PHP , Mysql and Javascript for a junior developer. If I wanted to try my hand as Android Development do you think I might find it tough ? Also what new languages would I ...

热门标签