Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/visual-studio/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 带有ExpandableListActivity的窗口功能\u左\u图标不工作_Android - Fatal编程技术网

Android 带有ExpandableListActivity的窗口功能\u左\u图标不工作

Android 带有ExpandableListActivity的窗口功能\u左\u图标不工作,android,Android,我用的是API 10姜饼 我没有使用布局,虽然我尝试过使用布局,但仍然不起作用。正常活动子类可以正常工作,我不知道问题出在哪里 public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_LEFT_ICON); setFeatureDrawableResource(Window.FEATU

我用的是API 10姜饼

我没有使用布局,虽然我尝试过使用布局,但仍然不起作用。正常活动子类可以正常工作,我不知道问题出在哪里

 public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestWindowFeature(Window.FEATURE_LEFT_ICON);
    setFeatureDrawableResource(Window.FEATURE_LEFT_ICON,R.drawable.ic_launcher);
不管它值多少钱,使用FEATURE_NO_TITLE都很好。有什么好处?有人有什么建议吗?

试试这段代码

requestWindowFeature(Window.FEATURE_LEFT_ICON);
setContentView(R.layout.main); //or whatever layout is shows
setFeatureDrawableResource(Window.FEATURE_LEFT_ICON,R.drawable.ic_launcher);
请尝试此代码

requestWindowFeature(Window.FEATURE_LEFT_ICON);
setContentView(R.layout.main); //or whatever layout is shows
setFeatureDrawableResource(Window.FEATURE_LEFT_ICON,R.drawable.ic_launcher);