当前位置: 首页>>代码示例>>Java>>正文


Java TiCompositeLayout类代码示例

本文整理汇总了Java中org.appcelerator.titanium.view.TiCompositeLayout的典型用法代码示例。如果您正苦于以下问题:Java TiCompositeLayout类的具体用法?Java TiCompositeLayout怎么用?Java TiCompositeLayout使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


TiCompositeLayout类属于org.appcelerator.titanium.view包,在下文中一共展示了TiCompositeLayout类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: ExampleView

import org.appcelerator.titanium.view.TiCompositeLayout; //导入依赖的package包/类
public ExampleView(TiViewProxy proxy) {
	super(proxy);
	LayoutArrangement arrangement = LayoutArrangement.DEFAULT;

	if (proxy.hasProperty(TiC.PROPERTY_LAYOUT)) {
		String layoutProperty = TiConvert.toString(proxy.getProperty(TiC.PROPERTY_LAYOUT));
		if (layoutProperty.equals(TiC.LAYOUT_HORIZONTAL)) {
			arrangement = LayoutArrangement.HORIZONTAL;
		} else if (layoutProperty.equals(TiC.LAYOUT_VERTICAL)) {
			arrangement = LayoutArrangement.VERTICAL;
		}
	}
	setNativeView(new TiCompositeLayout(proxy.getActivity(), arrangement));
}
 
开发者ID:E2010,项目名称:android-parse-module-titanium-3-5,代码行数:15,代码来源:ExampleProxy.java

示例2: generateCellContent

import org.appcelerator.titanium.view.TiCompositeLayout; //导入依赖的package包/类
/**
 * This method creates a new cell and fill it with content. getView() calls this method
 * when a view needs to be created.
 * @param index Entry's index relative to its section
 * @return
 */
public void generateCellContent(int sectionIndex, KrollDict data, CollectionViewTemplate template, BaseCollectionViewItem itemContent, int itemPosition, View item_layout) {
	//Here we create an item content and populate it with data
	//Get item proxy
	TiViewProxy itemProxy = template.getRootItem().getViewProxy();
	//Create corresponding TiUIView for item proxy
	CollectionItem item = new CollectionItem(itemProxy, (TiCompositeLayout.LayoutParams)itemContent.getLayoutParams(), itemContent, item_layout);		
	//Connect native view with TiUIView so we can get it from recycled view.
	itemContent.setTag(item);

	if (data != null && template != null) {
		generateChildContentViews(template.getRootItem(), null, itemContent, true);
		populateViews(data, itemContent, template, itemPosition, sectionIndex, item_layout);
	}
}
 
开发者ID:nuno,项目名称:TiCollectionView,代码行数:21,代码来源:CollectionSectionProxy.java

示例3: replaceCenterView

import org.appcelerator.titanium.view.TiCompositeLayout; //导入依赖的package包/类
/**
 * centerView
 */
public void replaceCenterView(TiViewProxy viewProxy) {
	if (viewProxy == this.centerView) {
		Log.d(TAG, "centerView was not changed");
		return;
	}
	if (viewProxy == null) {
		return;
	}

	viewProxy.setActivity(proxy.getActivity());
	TiUIView contentView = getOrCreateView(viewProxy);

	View view = contentView.getOuterView();
	TiCompositeLayout fL = (TiCompositeLayout)getNativeView().findViewById(id_content_frame);
	ViewParent viewParent = view.getParent();
	if (viewParent == null) {
		fL.addView(view, contentView.getLayoutParams());
	}
	if (viewParent instanceof ViewGroup && viewParent != fL) {
		((ViewGroup)viewParent).removeView(view);
		fL.addView(view, contentView.getLayoutParams());
	}
	if (this.centerView != null) {
		fL.removeView(getOrCreateView(this.centerView).getNativeView());
		this.centerView.releaseViews();
	}
	this.centerView = viewProxy;
}
 
开发者ID:manumaticx,项目名称:Ti.DrawerLayout,代码行数:32,代码来源:Drawer.java


注:本文中的org.appcelerator.titanium.view.TiCompositeLayout类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。