Today we are discussing about the drag & drop elements in ADVANCED.In the bellow figure show the elements in ADVANCED.
requestFocus & View
- The class in view represents basic building blocks for the user interface.
- A view is responsible for event handling and drawing.
- View is used to create interactive UI components.
- The default code is given bellow.
<requestFocus />
<View
android:id="@+id/view1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
ViewStub
- A ViewStub is used to inflate layout resources at runtime.
- A ViewStub is becoming visible when inflate() is invoked.
- The default code is given bellow.
android:id="@+id/viewStub1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
GestureOverlayView
- GestureOverlayView is a transparency overlay for giving input that is placed on the top of other widgets.
- The default code is given bellow.
<android.gesture.GestureOverlayView
android:id="@+id/gestureOverlayView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
</android.gesture.GestureOverlayView>
SurfaceView
- SurfaceView is used to provide a dedicated surface for drawing embedded inside of a view.
- The default code is given bellow.
<SurfaceView
android:id="@+id/surfaceView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
ZoomButton
- ZoomButton is used to zooming anything depends on the place where it is placed/
- The default code is given bellow.
<ZoomButton
android:id="@+id/zoomButton1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@android:drawable/btn_plus"
/>
ZoomControls
- ZoomControls is used for both zoom in and zoom out.
- It is mainly used in image applications.
- The default code is given bellow.
<ZoomControls
android:id="@+id/zoomControls1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
DialFilter
- The deafult code is shown bellow.
<DialerFilter
android:id="@+id/dialerFilter1"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<EditText
android:id="@android:id/hint"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Hint" >
<requestFocus />
</EditText>
<EditText
android:id="@android:id/primary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@android:id/hint"
android:text="Primary" />
</DialerFilter>
TwoLineItemList
- A view group with two children is used in ListViews.
- The default code is given bellow.
<TwoLineListItem
android:id="@+id/twoLineListItem1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
AbsoluteLayout
- An absolute layout is used to specify locations of its childrens
- It is less flexible and hard to maintain.
- The default code is given bellow.
<AbsoluteLayout
android:id="@+id/absoluteLayout1"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</AbsoluteLayout>
0 comments:
Post a Comment