问题:
如何恢复标题?
这是缺失标题的屏幕截图:
Actionbar设置:
ActionBar actionBar = getSupportActionBar();
actionBar.setTitle("My Title");
actionBar.setIcon(drawable.dropdown_user);
View mLogoView = LayoutInflater.from(this).inflate(R.layout.mLogoView, null);
actionBar.setCustomView(mLogoView);
actionBar.setDisplayShowCustomEnabled(true);
actionBar.setDisplayShowTitleEnabled(true);
actionBar.setDisplayHomeAsUpEnabled(true);
mLogoView.xml:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="match_parent" >
<ImageView
android:id="@+id/img_merchant"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:src="@drawable/infoflex">
</ImageView>
</RelativeLayout >