In LunarLander sample game provided as android sample game, I have a confusion about the layout.
As far I know there are some default layouts like FrameLayout, RelativeLayout and so on.
But in the below given layout xml file (Copied from LunarLander ) in line 6 they used
<com.example.android.lunarlander.LunarView
Can any one please explain me about the line ?
If this is this is a layout then how can I manually declare or use this kind of layout ?
Here’s the full xml layout
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<com.example.android.lunarlander.LunarView
android:id="@+id/lunar"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<TextView
android:id="@+id/text"
android:text="@string/lunar_layout_text_text"
android:visibility="visible"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:gravity="center_horizontal"
android:textColor="#88ffffff"
android:textSize="24sp"/>
</RelativeLayout>
</FrameLayout>
Thanks in advance
LinarView is a custom view ( IIC, derived from surface view ). And as it packed into frame layout, other silbing (RelativeLayout) is overlay over surface view. To use it in your application it has to be available as class. ( via jar, or you can develop it itself )