作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我的搜索栏有问题。我想让它禁用,但是当我使用 .setEnabled(false) 函数时,我的搜索栏消失了。如何避免这种情况?
我的布局:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorBackground">
<SeekBar
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/seekBar"
/>
</LinearLayout>
我的代码:
SeekBar seekBar=(SeekBar) findViewById(R.id.seekBar);
seekBar.setEnabled(false);
最佳答案
我仍然不知道为什么我的搜索栏消失了,但我找到了另一种方法来禁用搜索栏: https://stackoverflow.com/a/3278613/4313791
关于java - eekbar.setEnabled(false) 使seekbar不可见,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39836656/
我的搜索栏有问题。我想让它禁用,但是当我使用 .setEnabled(false) 函数时,我的搜索栏消失了。如何避免这种情况? 我的布局: 我的代码: SeekBar seekB
我是一名优秀的程序员,十分优秀!