0
A
回答
0
你可以嘗試定製視圖這樣,你可以將相關的大小更改爲您的應用程序
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="45dp"
android:orientation="vertical">
<View android:layout_width="match_parent"
android:layout_height="1px"
android:layout_alignParentBottom="true"
android:layout_marginBottom="25dp"
android:background="@color/colorAccent"/>
<View android:layout_width="match_parent"
android:layout_height="1px"
android:layout_alignParentBottom="true"
android:background="@color/colorAccent"/>
<ImageView
android:id="@+id/imageView"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_centerInParent="true"
android:src="@drawable/ic_menu_camera"
android:layout_gravity="center_horizontal"
android:background="@android:color/white"/>
</RelativeLayout>
+0
所以你的意思是把另一種佈局放在TabLayout之上?我試過了,但這是否是最佳做法?我認爲有任何方法可以自定義標籤項的位置 –
+0
否這是自定義佈局我想如果你想要更復雜的UI,你可以使用你的UI,不需要使用TabLayout。 –
相關問題
- 1. Android覆蓋項目
- 2. 的Android TabLayout文本的大小被覆蓋在三星設備
- 3. Tablayout是覆蓋CoordinatorLayout
- 4. 覆蓋Android庫項目中的類
- 5. WCF項目覆蓋
- 6. TabLayout中的單個選項卡沒有覆蓋整個寬度
- 7. android maps異步加載覆蓋項目
- 8. Android mapView:旋轉覆蓋項目
- 9. 從Android庫項目覆蓋活動
- 10. MapView的覆蓋項目
- 11. Android的 - 覆蓋小,中textAppearance,大
- 12. ListView項目覆蓋現有項目
- 13. WinForm覆蓋多個項目中的.ShowDialog()
- 14. cant刪除覆蓋項目?
- 15. 覆蓋eclipse項目名稱?
- 16. Asp.net Webdeployment項目覆蓋applicationSettings
- 17. 項目覆蓋方法
- 18. 刪除/覆蓋ListPicker項目
- 19. 在Android庫項目中替換(或「覆蓋」)字符串
- 20. Android的,覆蓋項目中的ListView視圖顯示實際值
- 21. 如何覆蓋Android庫項目中定義的drawables?
- 22. 在Ant中覆蓋目標
- 23. 添加新項目時列表中的項目被覆蓋
- 24. VS2008安裝項目 - 覆蓋較新版本
- 25. 構建MSI項目並使用較新版本覆蓋
- 26. 資源在Android中覆蓋
- 27. Java在Android中覆蓋XML?
- 28. 在Android中覆蓋圖像
- 29. 在Android中覆蓋CPU鎖
- 30. 的MSBuild覆蓋項目引用解析爲預編譯大會
您可以自定義在TabLayout每個選項卡,並手動將其添加到您的TabLayout。 你閱讀這篇文章是爲了更清楚的解釋。 http://www.android4devs.com/2015/12/tab-layout-material-design-support.html –
@RoShanShan我已經使用自己的自定義tablayout,但不知道標籤項目如何可以覆蓋Tablayout的邊框,如上圖所示。 :( –
檢查下面的視圖 –