线性布局禁用单击导航抽屉

时间:2020-10-09 18:17:30

标签: android android-studio android-linearlayout

导航抽屉中的菜单项由于是线性布局而没有响应,我尝试使用约束布局而不是线性布局,但是给出的结果是相同的,没有线性布局或约束布局,菜单项就可以单击并响应。 如何解决此错误并使菜单项在线性布局中可点击?

const convert = (numberWithDecimal) => numberWithDecimal .toFixed(1) .replace('.', ',') .replace(',0', '') .replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1."); console.log(convert(123.123)); // "123,1" that's ok console.log(convert(123.005)); // "123,1" that's ok

1 个答案:

答案 0 :(得分:0)

交换NavigationViewLinearLayout的顺序,以使NavigationView在XML文件中的LinearLayout下方。这样可以确保在接收点击事件时,NavigationView位于LinearLayout的顶部。