2017-08-05 47 views
0

This is my error photo我不能看到模拟器

我的ImageButton这是我的activity_main.xml中

<VideoView 
    android:layout_alignParentRight="true" 
    android:layout_alignParentLeft="true" 
    android:layout_alignParentTop="true" 
    android:layout_alignParentBottom="true" 
    android:id="@+id/video_view" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    /> 

    <RelativeLayout 
     android:background="#c64e4e4e" 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" 
     android:layout_alignParentTop="true" 
     android:layout_alignParentLeft="true" 
     android:layout_alignParentStart="true"> 

     <ImageButton 
      android:id="@+id/imageButton11" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:layout_alignParentBottom="true" 
      android:layout_centerHorizontal="true" 
      android:layout_marginBottom="192dp" 
      app:srcCompat="@drawable/play" /> 
    </RelativeLayout> 

</RelativeLayout> 

所以我不能看到我的模拟器我的ImageButton。我的照片是PNG,但我可以看到Android工作室透明的东西,任何人都可以帮助我吗?谢谢。

回答

0

更改ImageButton到:

<ImageButton 
     android:id="@+id/imageButton11" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_alignParentBottom="true" 
     android:layout_centerHorizontal="true" 
     android:layout_marginBottom="192dp" 
     android:src="@drawable/play" /> 
+0

谢谢,它的工作。我怎样才能改变我的ImageButton分辨率? –

+0

请接受我的回答,您必须为不同的屏幕尺寸设计图像 –

+0

好的,我接受了。我的图片是PNG,但Android Studio是猜jpg。 [像这样](https://vgy.me/s1RK4M.png)我该如何解决这个问题? –