0

ツールバーから開始マージンと終了マージンを削除するにはどうすればよいですか?以下はデザインライブラリを使用しているときに不明なツールバーの余白

enter image description here

私のxmlです:

<?xml version="1.0" encoding="utf-8"?> 
<android.support.design.widget.CoordinatorLayout 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:app="http://schemas.android.com/apk/res-auto" 
    xmlns:tools="http://schemas.android.com/tools" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:fitsSystemWindows="true" 
    tools:context="com.test.activities.topup.CreditCardDetailsVerification"> 

<android.support.design.widget.AppBarLayout 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:theme="@style/AppTheme.AppBarOverlay"> 

    <android.support.v7.widget.Toolbar 
     android:id="@+id/toolbar" 
     android:layout_width="match_parent" 
     android:layout_height="?attr/actionBarSize" 
     app:popupTheme="@style/AppTheme.PopupOverlay"/> 

</android.support.design.widget.AppBarLayout> 

<include layout="@layout/content_credit_card_details_verification"/> 

style.xml

<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar"> 
    <item name="android:background">@android:color/transparent</item> 
</style> 

STY le.xml(v21)

<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar"> 
    <item name="android:background">@android:color/transparent</item> 
    <item name="android:backgroundTint">@android:color/transparent</item> 
</style> 
+0

は、このプロパティに アプリを試してみてください。contentInsetStart = "0dp" アプリを:contentInsetEnd = "0dpを" –

+0

AppTheme.AppBarOverlayを確認してください。あなたが間違ってstyles.xmlに入れたかもしれないと私は推測します。すべてのstyles.xmlを確認してください。 –

+0

@DivyangPanchal - 動作していません –

答えて

0

私はそれを理解しました。この問題の原因となったのは<item name="android:backgroundTint">@android:color/transparent</item>でした。私はそれを削除し、ツールバーの開始と終了の余白も削除されます。

関連する問題