本文整理汇总了Java中org.appcelerator.titanium.proxy.TiViewProxy.getActivity方法的典型用法代码示例。如果您正苦于以下问题:Java TiViewProxy.getActivity方法的具体用法?Java TiViewProxy.getActivity怎么用?Java TiViewProxy.getActivity使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.appcelerator.titanium.proxy.TiViewProxy
的用法示例。
在下文中一共展示了TiViewProxy.getActivity方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getOrCreateView
import org.appcelerator.titanium.proxy.TiViewProxy; //导入方法依赖的package包/类
private TiUIView getOrCreateView(TiViewProxy viewProxy) {
if (viewProxy == null) {
return null;
}
TiUIView view = viewProxy.getOrCreateView();
if (view != null) {
return view;
}
Log.w(TAG, "getOrCreateView failed. Returned value is null");
TiBaseActivity originalActivity = (TiBaseActivity) viewProxy.getActivity();
if (originalActivity.isDestroyed()) {
Log.w(TAG, "Original viewProxy activity is destroyed.");
}
Activity thisActivity = this.proxy.getActivity();
if (thisActivity != originalActivity) {
viewProxy.attachActivityLifecycle(thisActivity);
}
return viewProxy.getOrCreateView();
}
示例2: TiUIProgressBar
import org.appcelerator.titanium.proxy.TiViewProxy; //导入方法依赖的package包/类
public TiUIProgressBar(final TiViewProxy proxy) {
super(proxy);
view = new LinearLayout(proxy.getActivity()) {
@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
super.onLayout(changed, left, top, right, bottom);
TiUIHelper.firePostLayoutEvent(proxy);
}
};
view.setOrientation(LinearLayout.VERTICAL);
label = new TextView(proxy.getActivity());
label.setGravity(Gravity.TOP | Gravity.LEFT);
label.setPadding(0, 0, 0, 0);
label.setSingleLine(false);
progress = new ProgressBar(proxy.getActivity(), null, android.R.attr.progressBarStyleHorizontal);
progress.setIndeterminate(false);
progress.setMax(1000);
view.addView(label);
view.addView(progress);
setNativeView(view);
}
示例3: TiFlipView
import org.appcelerator.titanium.proxy.TiViewProxy; //导入方法依赖的package包/类
public TiFlipView(TiViewProxy proxy) {
super(proxy);
Activity activity = proxy.getActivity();
mViews = new ArrayList<TiViewProxy>();
mAdapter = new FlipViewAdapter(activity, mViews);
mFlipView = new FlipView(activity);
mFlipView.setAdapter(mAdapter);
mFlipView.setOnFlipListener(this);
}
示例4: CameraView
import org.appcelerator.titanium.proxy.TiViewProxy; //导入方法依赖的package包/类
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);
}
示例5: ExampleView
import org.appcelerator.titanium.proxy.TiViewProxy; //导入方法依赖的package包/类
public ExampleView(TiViewProxy proxy) {
super(proxy);
LinearLayout view = new LinearLayout( proxy.getActivity() );
view.setFocusable( true );
view.setFocusableInTouchMode( true );
setNativeView( view );
}
示例6: CanvasView
import org.appcelerator.titanium.proxy.TiViewProxy; //导入方法依赖的package包/类
public CanvasView(TiViewProxy proxy) {
super(proxy);
activity = proxy.getActivity();
cView = new CView(activity);
cView.proxy = proxy;
setNativeView(cView);
}
示例7: MapsforgeView
import org.appcelerator.titanium.proxy.TiViewProxy; //导入方法依赖的package包/类
public MapsforgeView(TiViewProxy proxy) {
super(proxy);
MapView mapView = new MapView(proxy.getActivity());
this.mGraphicFactory = AndroidGraphicFactory.INSTANCE;
setNativeView(mapView);
}
示例8: TiTouchImageView
import org.appcelerator.titanium.proxy.TiViewProxy; //导入方法依赖的package包/类
public TiTouchImageView(final TiViewProxy proxy) {
super(proxy);
tiv = new TouchImageView(proxy.getActivity());
getLayoutParams().autoFillsHeight = true;
getLayoutParams().autoFillsWidth = true;
setNativeView(tiv);
}