I currently have the following XML code for my custom view:
<com.pink.jazz.RootView android:id="@+id/rootView" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingStart="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingEnd="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" tools:context=".MouseActivity" > <ImageView android:id="@+id/mouse_hole" android:layout_width="match_parent" android:layout_height="match_parent" android:src="@drawable/mouse_hole" android:visibility="gone" /> </com.pink.jazz.RootView>
On some devices (for example, Samsung Galaxy Tab 4), the mouse_hole wallpaper image is displayed in order, while it does not appear at all on other devices, such as Asus Transformer Infinity TF700T. The visibility of mouse_hole changes its appearance to the software side when I start my game. My custom view extends RelativeLayout .
Can anyone find out what's wrong here?
source share