android標題欄沉浸效果
android4.4開始實現了狀態列的沉浸,即狀態列一體化,效果如圖:
下面來看實現步驟:
首先,你需要在value-19中的style.xml中新增以下屬性:
name="android:windowtranslucentstatus">true
item>
<?xml version="1.0" encoding="utf-8"?>
xmlns:android=""
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/default_color"
android:fitssystemwindows="true">這樣就可以避免狀態列的遮擋,在測試中發現,當執行在android4.4以下的系統上時,會發現會多出actionbar,解決這個問題也很簡單,只需要在values資料夾下的style.xml中新增name=」android:windownotitle」>true即可,如下:
標題欄漸變效果
一 效果圖 三 自定義view,這裡面我繼承的是scrollview public class boxdetailscrollview extends scrollview public boxdetailscrollview context context,attributeset attrs,i...
Android共用標題欄
首先建立乙個標題的布局檔案 然後建立這個布局檔案對應的class,這個class繼承linearlayout類,並且實現view.onclicklistener package com.example.administrator.uicustomview import android.content...
android去除標題欄
這是常用的幾種辦法 方法1 直接在activity的oncreate 方法中,requestwindowfeature window.feature no title 注意這句 要寫在,設定布局之前,不過這樣有個缺點只是在單個頁面的!方法2 在清單檔案中配置一下,將它預設的主題改為 android ...