Open williams-sgvu opened 10 years ago
All workaround that post above collapsing the home icon but leaving a blank space. For avoiding that you need to set the logo size to zero . Below added my code snippet
actionBar.setLogo(new ColorDrawable(Color.TRANSPARENT));
View homeIcon = findViewById(
Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB ?
android.R.id.home : R.id.abs__home);
((View) homeIcon.getParent()).setLayoutParams(new LinearLayout.LayoutParams(0, 0));
((View) homeIcon).setVisibility(View.GONE);
Hello I am using Sherlock library to achieve the ActionBar Tabs. Here I am setting custom title and want to hide the icon at the title bar but some issue that ActionBar tabs now appearing at above of ActionBar.
I see this issue here https://github.com/JakeWharton/ActionBarSherlock/issues/327#ref-issue-7764467
so I am trying to solve this issue using that working but that is creating other issue.
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_tariff_plans_layout);
} but here now ActionBar title is looking like below, see there is left black area so I am looking to remove this with my color so my question Is there any way to remove that black area ?
custom_title_bar.xml
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/relativeLayout1" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@drawable/header_smartpay" android:orientation="horizontal" >
Below Android 3.0, I am having that issue but that is working perfectly above Android OS 3.0.