I am using the Barlock Bar for my project. But I am facing a problem. I use this code in the OnCreate method.
ActionBar actionBar = getSupportActionBar();
actionBar.setHomeButtonEnabled(true);
actionBar.setDisplayHomeAsUpEnabled(true);
View iconImage = findViewById(android.R.id.home);
iconImage.setPadding(100, 0, 0, 0);
In android 4.1, "iconImage" is not null. But on Android 2.3. iconImage is always zero. You know why? and did you know how I can get the home button in Android 2.3. Note. I checked, I can detect the action of pressing a button on a house by implementing the onOptionsItemSelected method.
Please help me!
source
share