开发者

Doubt in XML layout file : Layout file starting with 'com.android..'

I came across this xml file in android developer site. So far I have only seen layouts(starting with LinearLayout etc..) in the xml layout file. Something like this.. starting with 'co.android.launcher.Workspace' is new to me. Can someone tell me what is the significance of this layout file.

<com.an开发者_StackOverflow社区droid.launcher.Workspace              **?? : What does this signify**
android:id="@+id/workspace"
android:layout_width="fill_parent"
android:layout_height="fill_parent"

launcher:defaultScreen="1">

<include android:id="@+id/cell1" layout="@layout/workspace_screen" />
<include android:id="@+id/cell2" layout="@layout/workspace_screen" />
<include android:id="@+id/cell3" layout="@layout/workspace_screen" />

</com.android.launcher.Workspace>


It is custom view.

1) com.android.launcher is package name.

2) Workspace is class name

This class has extends view. inshort we can create our own custom view using extends View and import this custom view in xml using like as com.android.launcher.Workspace

for more detail check below link

LabelView.java

custom_view_1.xml


Its custom layout made by developer you can make your own also by extending the linear layout or other view components and use that layout in XML file.

see they have explained on developer site

http://developer.android.com/guide/topics/ui/custom-components.html


It means that the root of this layout is Workspace widget from com.android.launcher package.


com.android.launcher is the package name of Workspace  class

You can refer your java class here in this way

Your Workspace may be View group(Container).

You can also see this in mapview class

<com.google.android.maps.MapView>
</com.google.android.maps.MapView>

It means com.ggogle.android.maps is the package of MapView class

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜