public abstract class

SpecificView

extends View
java.lang.Object
   ↳ com.neomades.ui.View
     ↳ com.neomades.platform.SpecificView

Class Overview

Platform specific view to be integrated into NeoMAD User interface.

Example in Android

 public class MySpecificButton extends SpecificView {
 
 	private android.widget.Button myButton;
 
 	public MySpecificButton(Screen screen) {
 		super();
 
 		// for android, we need the android context from screen
 		Activity activity = (Activity) SpecificUtils.getSpecificScreen(screen);
 
 		// IMPORTANT : setUI() should be called in order to display the specific
 		// platform view
 		setSpecificView(new android.widget.Button(activity));
 	}
 
 	public void setText(String text) {
 		this.myButton.setText(text);
 	}
 }
 

Summary

[Expand]
Inherited XML Attributes
From class com.neomades.ui.View
[Expand]
Inherited Constants
From interface com.neomades.ui.Alignment
From interface com.neomades.ui.StretchMode
Protected Constructors
SpecificView()
Creates a NeoMAD specific view which wraps a platform specific view.
Protected Methods
Object getSpecificView()
  • iOS: child of UIView
  • Android: child of android.view.View
void setSpecificView(Object nativeView)
  • iOS: UIView
  • Android: child of android.view.View
[Expand]
Inherited Methods
From class com.neomades.ui.View
From class java.lang.Object

Protected Constructors

protected SpecificView ()

Creates a NeoMAD specific view which wraps a platform specific view.

Protected Methods

protected Object getSpecificView ()

  • iOS: child of UIView
  • Android: child of android.view.View

Returns
  • the platform-specific nativeView

protected void setSpecificView (Object nativeView)

  • iOS: UIView
  • Android: child of android.view.View

Parameters
nativeView the platform-specific nativeView
Throws
ClassCastException if the parameter is not a platform specific view