gpt4 book ai didi

java - HoloEverywhere SeekBar ClassCastException 异常

转载 作者:太空狗 更新时间:2023-10-29 16:43:15 25 4
gpt4 key购买 nike

我正在使用 HoloEverywhere 提供的 SeekBar 类。我有以下进口商品:

import org.holoeverywhere.widget.SeekBar;
import org.holoeverywhere.widget.SeekBar.OnSeekBarChangeListener;

我没有得到任何初步错误或警告,但是当我编译时,我在以下行中得到一个类强制转换异常:

sectionTimeElapsedSeekBar = (SeekBar) findViewById(R.id.sectionTimeElapsedSeekBar);

这是相应的 XML:

<SeekBar
android:id="@+id/sectionTimeElapsedSeekBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/startOrPauseTimerButton"
android:layout_alignParentLeft="true"
android:layout_marginBottom="16dp"
android:max="2100" />

有人有什么想法吗?

最佳答案

更改为:

<org.holoeverywhere.widget.SeekBar
android:id="@+id/sectionTimeElapsedSeekBar"
...
/>

关于java - HoloEverywhere SeekBar ClassCastException 异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14369534/

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