android鳍状肢在模拟器上运行但不在设备上运行

时间:2013-08-29 15:00:26

标签: android

Xml文件使用imageview在一个鳍状肢中有16个图像。

                      

    <ImageView android:id="@+id/imageView3"
        android:layout_width="fill_parent" android:layout_height="fill_parent"
        android:src="@drawable/c" />

    <ImageView android:id="@+id/imageView4"
        android:layout_width="fill_parent" android:layout_height="fill_parent"
        android:src="@drawable/d" />

    <ImageView android:id="@+id/imageView5"
        android:layout_width="fill_parent" android:layout_height="fill_parent"
        android:src="@drawable/e" />

    <ImageView android:id="@+id/imageView6"
        android:layout_width="fill_parent" android:layout_height="fill_parent"
        android:src="@drawable/f" />

    <ImageView android:id="@+id/imageView7"
        android:layout_width="fill_parent" android:layout_height="fill_parent"
        android:src="@drawable/g" />

    <ImageView android:id="@+id/imageView8"
        android:layout_width="fill_parent" android:layout_height="fill_parent"
        android:src="@drawable/h" />

    <ImageView android:id="@+id/imageView9"
        android:layout_width="fill_parent" android:layout_height="fill_parent"
        android:src="@drawable/i" />

    <ImageView android:id="@+id/imageView10"
        android:layout_width="fill_parent" android:layout_height="fill_parent"
        android:src="@drawable/j" />

    <ImageView android:id="@+id/imageView11"
        android:layout_width="fill_parent" android:layout_height="fill_parent"
        android:src="@drawable/k" />

    <ImageView android:id="@+id/imageView12"
        android:layout_width="fill_parent" android:layout_height="fill_parent"
        android:src="@drawable/l" />

    <ImageView android:id="@+id/imageView13"
        android:layout_width="fill_parent" android:layout_height="fill_parent"
        android:src="@drawable/m" />

    <ImageView android:id="@+id/imageView14"
        android:layout_width="fill_parent" android:layout_height="fill_parent"
        android:src="@drawable/n" />

    <ImageView android:id="@+id/imageView15"
        android:layout_width="fill_parent" android:layout_height="fill_parent"
        android:src="@drawable/o" />

    <ImageView android:id="@+id/imageView16"
        android:layout_width="fill_parent" android:layout_height="fill_parent"
        android:src="@drawable/p" />                

</ViewFlipper>

公共类MainActivity扩展了Activity实现OnClickListener {

ViewFlipper Flippy;

@Override

protected void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    Flippy=(ViewFlipper)findViewById(R.id.viewFlipper1);
    Flippy.setOnClickListener(this);

}

@覆盖

public void onClick(查看v){

Flippy.showNext();

}

}

在停止的设备上不工作

0 个答案:

没有答案