I don't have a 480x800 device so I am using genymotion emulator instead. The specs for Nexus-S says 480x800 but when I get the size of the screen in the app it says 480x728? I was wondering if that's something that is happening on the actual device as well or it is just a bug in genymotion emulator?
@Override
public void onClick( View view )
{
if ( view == null )
return;
View v1 = getActivity().findViewById( R.id.bg );
Toast.makeText( getActivity(), "height:" + v1.getHeight() + " width:" + v1.getWidth(), Toast.LENGTH_SHORT ).show();
}
I have these in my style.xml
<item name="android:windowFullscreen">true</item>
<item name="android:windowNoTitle">true</item>
Here is the layout file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/bg"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background" >
</RelativeLayout>