gZe*_*one 5 android android-layout
我正在为我的项目使用Sherlock Action Bar.但我面临着问题.我在OnCreate方法中使用此代码.
ActionBar actionBar = getSupportActionBar();
actionBar.setHomeButtonEnabled(true);
actionBar.setDisplayHomeAsUpEnabled(true);
View iconImage = findViewById(android.R.id.home);
iconImage.setPadding(100, 0, 0, 0);
Run Code Online (Sandbox Code Playgroud)
在android 4.1中,"iconImage"不为null.但在Android 2.3上.iconImage始终为null.你知道为什么吗?你知道如何在android 2.3中获得主页按钮吗?注意:我检查过,我可以通过实现onOptionsItemSelected方法检测主页按钮单击操作.
请帮我 !
| 归档时间: |
|
| 查看次数: |
4671 次 |
| 最近记录: |