問題は次のとおりです。アクティビティの 1 つで、アクション バーのカスタム レイアウトが必要でした。それを行う唯一の方法は、画面上に透明な ActionBar を配置することでした。そのために、ActionBar をオーバーレイとしてマークし、アクション バーの背景を透明に指定しました。これは、Android >= 15 を使用している場合に機能しますが、14 以下では、ActionBar はその下の境界線を保持します。私はそれを取り除くために何かを試みましたが、役に立ちませんでした。
より明確に見るための写真を次に示します。
API 14 で:
API 16 の場合:
デザインは次のとおりです。アクション バーは透明でオーバーレイ モードであることが想定されており、その背後には背景 + ロゴがあります。
<ImageView
android:id="@+id/action_bar_background"
android:layout_width="match_parent"
android:layout_height="@dimen/action_bar_accueil_total_height"
android:layout_alignParentTop="true"
android:contentDescription="@string/action_bar"
android:scaleType="fitXY"
android:src="@drawable/actionbar_logo_extended" />
<ImageView
android:id="@+id/home_gallica_logo"
android:layout_width="@dimen/largeur_logo_carrousel"
android:layout_height="@dimen/action_bar_accueil_total_height"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:contentDescription="@string/action_bar"
android:src="@drawable/logo_fullcolor" />
いくつかの精度: 私は ABS を使用していますが、v7 サポート ライブラリに切り替えてもまったく同じことが行われたため、これが問題の原因ではないようです。
この下の境界線を削除する方法を知っている人はいますか?