Android Guides | Samples

Android.Widget.Gallery Class

A view that shows items in a center-locked, horizontally scrolling list.

See Also: Gallery

Syntax

[Android.Runtime.Register("android/widget/Gallery", DoNotGenerateAcw=true)]
[System.Obsolete("This class is obsoleted in this android platform")]
public class Gallery : AbsSpinner, GestureDetector+IOnGestureListener, IDisposable

Remarks

A view that shows items in a center-locked, horizontally scrolling list.

The default values for the Gallery assume you will be using NoType:android/R$styleable;Href=../../../reference/android/R.styleable.html#Theme_galleryItemBackground as the background for each View given to the Gallery from the Adapter. If you are not doing this, you may need to adjust some Gallery properties, such as the spacing.

Views given to the Gallery should use NoType:android/widget/Gallery$LayoutParams;Href=../../../reference/android/widget/Gallery.LayoutParams.html as their layout parameters type.

[Android Documentation]

Requirements

Namespace: Android.Widget
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1Deprecated since API level 16

The members of Android.Widget.Gallery are listed below.

See Also: AbsSpinner

Public Constructors

Protected Constructors

A constructor used when creating managed representations of JNI objects; called by the runtime.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

OnDown(MotionEvent) : Boolean
Notified when a tap occurs with the down MotionEvent that triggered it.
OnFling(MotionEvent, MotionEvent, Single, Single) : Boolean
Notified of a fling event when it occurs with the initial on down MotionEvent and the matching up MotionEvent.
OnLongPress(MotionEvent)
Notified when a long press occurs with the initial on down MotionEvent that trigged it.
OnScroll(MotionEvent, MotionEvent, Single, Single) : Boolean
Notified when a scroll occurs with the initial on down MotionEvent and the current move MotionEvent.
OnShowPress(MotionEvent)
The user has performed a down MotionEvent and not performed a move or up yet.
OnSingleTapUp(MotionEvent) : Boolean
Notified when a tap occurs with the up MotionEvent that triggered it.
SetAnimationDuration(Int32)
Sets how long the transition animation should run when a child view changes position.
SetCallbackDuringFling(Boolean)
Whether or not to callback on any AdapterView.OnItemSelectedListener while the items are being flinged.
SetGravity(GravityFlags)
Describes how the child views are aligned.
SetSpacing(Int32)
Sets the spacing between items in a Gallery
SetUnselectedAlpha(Single)
Sets the alpha of items that are not selected in the Gallery.