【发布时间】:2014-05-19 11:09:33
【问题描述】:
我为导航选项卡创建了一个自定义视图。没关系。但是,这种布局有两个问题:图标出现在中心位置上方一点,并且文本覆盖了导航指示器。导航选项卡如下所示:
这是我的自定义布局 xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<ImageView
android:id="@+id/navigation_tab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:src="@drawable/ic_search" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Search"
android:textSize="12sp" />
</LinearLayout>
【问题讨论】:
标签: android layout tabs navigation