Android:如何在Android应用程序的所有活动中设置徽标

Android:如何在Android应用程序的所有活动中设置徽标,android,Android,我想在活动中的应用程序名称前设置徽标? 请任何人帮助我在右上角的活动页面中设置徽标(图标)。CustomWindowTitle.xml public class CustomWindowTitle extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { su

我想在活动中的应用程序名称前设置徽标? 请任何人帮助我在右上角的活动页面中设置徽标(图标)。

CustomWindowTitle.xml

public class CustomWindowTitle extends Activity {
    /** Called when the activity is first created. */
    @Override
    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.window_title);
    }
}
window_title.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="horizontal"
    android:layout_width="fill_parent"
    android:layout_height="35dip"
    android:gravity="center_vertical"
    android:paddingLeft="5dip"
    android:background="#323331">

    <ImageView
        android:id="@+id/header"
        android:src="@drawable/header"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"/>

</LinearLayout>


请参见您必须使用自定义标题栏。检查下面的链接@NiravRanpara这仅在不支持ActionBar的旧版本Android中需要,并且只有在您选择不使用这些旧版本的支持库时才需要。@Helina Deveraj,请添加您的研究和尝试,以便我们知道确切的问题所在,你不能要求别人为你写代码,我绝对建议你使用本地人的logo功能而不是你自己的。