问题描述
我的线性布局中有一个按钮,对于我的 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 (将#修改为@)