Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove left space within toolbar #243

Open
titosobabas opened this issue Dec 25, 2019 · 2 comments
Open

Remove left space within toolbar #243

titosobabas opened this issue Dec 25, 2019 · 2 comments

Comments

@titosobabas
Copy link

Why do i getting this left space within my toolbar? I want to cover the whole width of the parent toolbar space.

imagen

This is my code:


<android.support.v7.widget.Toolbar android:id="@+id/toolbar_activity"
    android:layout_width="match_parent"
    android:layout_height="?attr/actionBarSize"
    android:background="@color/toolbar_background"
    app:titleTextColor="@color/toolbar_text_color"

    android:elevation="0dp"
    android:theme="@style/ToolbarTheme"
    app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"

    >

    <com.miguelcatalan.materialsearchview.MaterialSearchView
        android:id="@+id/search_view"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />
</android.support.v7.widget.Toolbar>
@titosobabas titosobabas changed the title Remove left space within toolba Remove left space within toolbar Dec 25, 2019
@titosobabas
Copy link
Author

titosobabas commented Dec 25, 2019

Well, looks like i've resolve it adding and letting my xml like this:

<android.support.v7.widget.Toolbar android:id="@+id/toolbar_activity"
    android:layout_width="match_parent"
    android:layout_height="?attr/actionBarSize"
    android:background="@color/toolbar_background"
    app:titleTextColor="@color/toolbar_text_color"

    android:elevation="0dp"
    android:theme="@style/ToolbarTheme"
    app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:contentInsetLeft="0dp"
    android:contentInsetStart="0dp"
    app:contentInsetLeft="0dp"
    app:contentInsetStart="0dp"
    android:contentInsetRight="0dp"
    android:contentInsetEnd="0dp"
    app:contentInsetRight="0dp"
    app:contentInsetEnd="0dp"
    >

    <com.miguelcatalan.materialsearchview.MaterialSearchView
        android:id="@+id/search_view"

        android:layout_width="match_parent"
        android:layout_height="wrap_content" />
</android.support.v7.widget.Toolbar>

@FANMixco
Copy link

FANMixco commented Jul 25, 2020

Well, looks like i've resolve it adding and letting my xml like this:

<android.support.v7.widget.Toolbar android:id="@+id/toolbar_activity"
    android:layout_width="match_parent"
    android:layout_height="?attr/actionBarSize"
    android:background="@color/toolbar_background"
    app:titleTextColor="@color/toolbar_text_color"

    android:elevation="0dp"
    android:theme="@style/ToolbarTheme"
    app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:contentInsetLeft="0dp"
    android:contentInsetStart="0dp"
    app:contentInsetLeft="0dp"
    app:contentInsetStart="0dp"
    android:contentInsetRight="0dp"
    android:contentInsetEnd="0dp"
    app:contentInsetRight="0dp"
    app:contentInsetEnd="0dp"
    >

    <com.miguelcatalan.materialsearchview.MaterialSearchView
        android:id="@+id/search_view"

        android:layout_width="match_parent"
        android:layout_height="wrap_content" />
</android.support.v7.widget.Toolbar>

Maybe to become optional, but from my understanding, this comes from Material Design standards. You could raise a pull request with the optional feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants