gpt4 book ai didi

android - 删除左填充

转载 作者:行者123 更新时间:2023-11-29 17:00:51 29 4
gpt4 key购买 nike

I added search view to toolbar.but there is small gap in Left side between LinearLayout and toolbar.I need to remove that padding.But I did not added any padding intentionally.How can I remove that?Thanks in advance.

enter image description here

 <android.support.v7.widget.Toolbar
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/orange"
android:id="@+id/toolbar"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:title="Drawer With Swipe Tabs"
android:weightSum="1">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>

<EditText
android:id="@+id/editMobileNo"
android:layout_width="0dp"
android:layout_height="40dp"
android:layout_marginTop="5dp"
android:paddingLeft="5dp"

android:background="@drawable/login_edittext"
android:textColor="@color/orange"
android:textColorHint="@color/orange"
android:hint="@string/search"
android:drawableLeft="@drawable/search2"
android:drawablePadding="10dp"
android:gravity="left"
android:layout_weight="0.96">
</EditText>
<ImageButton
android:layout_width="0dp"
android:layout_height="30dp"
android:layout_weight="0.1"
android:layout_margin="5dp"
android:ems="10"
android:background="@drawable/alarm3"
android:gravity="center"
>
</ImageButton>
</LinearLayout>



</android.support.v7.widget.Toolbar>

最佳答案

<android.support.v7.widget.Toolbar
.
.
.
.

android:contentInsetLeft="0dp"
android:contentInsetStart="0dp"
app:contentInsetLeft="0dp"
app:contentInsetStart="0dp"
android:contentInsetRight="0dp"
android:contentInsetEnd="0dp"
app:contentInsetRight="0dp"
app:contentInsetEnd="0dp" />

添加这些以删除内容插图

关于android - 删除左填充,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43085527/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com