如何解决如何去除线性布局的背景?
我的线性布局中有一个按钮,对于我的 Activity 中的线性布局,即使我没有指定背景,它看起来也是灰色的,如下图所示。我怎样才能删除它?
活动布局文件
<LinearLayout
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:orientation="vertical">
//This is the linear layout I am talking about where I do not want the grey background
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:id="@+id/LinearLayoutView1"
>
<Button
android:id="@+id/uploadAllReportsNew"
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="@drawable/flightclosurebutton"
android:paddingLeft="30dp"
android:paddingRight="30dp"
android:text="Upload All"
android:layout_gravity="center"
android:layout_marginRight="15dp"
android:layout_marginLeft="15dp"
android:layout_marginTop="15dp"
android:layout_marginBottom="15dp"
android:textAllCaps="false"
/>
</LinearLayout>
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottom_navigation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="@+id/constraint_layout"
app:menu="@menu/bottom_navigation" />
</LinearLayout>
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。