Java Code Examples for org.appcelerator.titanium.proxy.TiViewProxy#getActivity()

The following examples show how to use org.appcelerator.titanium.proxy.TiViewProxy#getActivity() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CameraViewProxy.java    From Ti-Android-CameraView with MIT License 5 votes vote down vote up
public CameraView(TiViewProxy proxy) {
	super(proxy);
	
	SurfaceView preview = new SurfaceView(proxy.getActivity());
	SurfaceHolder previewHolder = preview.getHolder();
	previewHolder.addCallback(this);
	previewHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
	
	FrameLayout previewLayout = new FrameLayout(proxy.getActivity());
	previewLayout.addView(preview, layoutParams);
	
	setNativeView(previewLayout);
}
 
Example 2
Source File: ViewProxy.java    From TiAndroidAutofocus with MIT License 5 votes vote down vote up
public ExampleView(TiViewProxy proxy) {
	super(proxy);
	LinearLayout view = new LinearLayout( proxy.getActivity() );
	view.setFocusable( true );
	view.setFocusableInTouchMode( true );
	setNativeView( view );
}
 
Example 3
Source File: ViewProxy.java    From TiTouchImageView with MIT License 3 votes vote down vote up
public TiTouchImageView(final TiViewProxy proxy) {
	super(proxy);

	tiv = new TouchImageView(proxy.getActivity());

	getLayoutParams().autoFillsHeight = true;
	getLayoutParams().autoFillsWidth = true;

	setNativeView(tiv);
}