Java 一个活动中有3次飞溅,但按钮不起作用

Java 一个活动中有3次飞溅,但按钮不起作用,java,android,android-activity,timer,splash-screen,Java,Android,Android Activity,Timer,Splash Screen,我有一个启动活动,我想在幻灯片模式下每2秒显示3张图片,我想在启动屏幕中添加跳过按钮,但它不起作用 这是我的splash.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_p

我有一个启动活动,我想在幻灯片模式下每2秒显示3张图片,我想在启动屏幕中添加跳过按钮,但它不起作用

这是我的splash.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:gravity="bottom|right"
android:background="#000000">

<LinearLayout
    android:layout_height="wrap_content"
    android:layout_width="match_parent"
    android:orientation="vertical"
    android:layout_weight="1.0"
    android:gravity="center">

    <Button
        android:id="@+id/slidesplash"
        android:layout_height="240dp"
        android:layout_width="240dp"
        android:maxHeight="360dp"
        android:maxWidth="360dp"
        android:minWidth="120dp"
        android:minHeight="120dp"
        android:layout_marginTop="30dp"
        android:text="how can i change the background of this button in each 2 seconds?"/>

</LinearLayout>

<Button
    android:id="@+id/splashskip"
    android:layout_height="60dp"
    android:layout_width="60dp"
    android:background="@drawable/splashskip"/>

</LinearLayout>
这是飞溅的图片


内部splash.java更改:

public class Splash extends Activity {
Button Button;


你能发布完整的错误堆栈吗?我正在使用AIDE它唯一的错误是这两行感谢它修复了错误,但现在当我运行应用程序时,按钮没有做任何事情,我必须等到飞溅结束,这超出了你原来问题的范围。请考虑回答这个问题,如果它对你有用的话。我的主要问题是如何在一个飞溅活动中连续设置3张图片。你的代码和你的初衷有几个问题。至少我帮你运行了你的程序。相应地编辑您的问题,我可能会进一步帮助您。在这一点上,您的布局和清单是不相关的。我认为按钮不起作用,因为启动超时在时间结束之前不会让按钮起作用。
public class Splash extends Activity {
Button Button;
public class Splash extends Activity {
Button button;