本文整理汇总了Java中com.pedrogomez.renderers.RendererBuilder类的典型用法代码示例。如果您正苦于以下问题:Java RendererBuilder类的具体用法?Java RendererBuilder怎么用?Java RendererBuilder使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
RendererBuilder类属于com.pedrogomez.renderers包,在下文中一共展示了RendererBuilder类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initAdapter
import com.pedrogomez.renderers.RendererBuilder; //导入依赖的package包/类
/**
* Initialize RVRendererAdapter
*/
private void initAdapter() {
RandomVideoCollectionGenerator randomVideoCollectionGenerator =
new RandomVideoCollectionGenerator();
final AdapteeCollection<Video> videoCollection =
randomVideoCollectionGenerator.generateListAdapteeVideoCollection(VIDEO_COUNT);
RendererBuilder<Video> rendererBuilder = new RendererBuilder<Video>().withPrototype(
new RemovableVideoRenderer(new RemovableVideoRenderer.Listener() {
@Override public void onRemoveButtonTapped(Video video) {
ArrayList<Video> clonedList =
new ArrayList<>((Collection<? extends Video>) videoCollection);
clonedList.remove(video);
adapter.diffUpdate(clonedList);
}
})).bind(Video.class, RemovableVideoRenderer.class);
adapter = new RVRendererAdapter<>(rendererBuilder, videoCollection);
}
示例2: onCreate
import com.pedrogomez.renderers.RendererBuilder; //导入依赖的package包/类
@Override protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ButterKnife.bind(this);
animationSubscription = Observable.interval(1, TimeUnit.SECONDS)
.observeOn(AndroidSchedulers.mainThread())
.subscribeOn(Schedulers.newThread())
.subscribe(animationTimer = PublishSubject.create());
RendererBuilder<Item> rendererBuilder = new RendererBuilder<>(new CustomRenderer(animationTimer));
RVRendererAdapter adapter = new RVRendererAdapter<>(rendererBuilder);
myList.setAdapter(adapter);
List<Item> items = new ArrayList<>();
items.add(new Item("Madrid", 18, 10));
items.add(new Item("California", 10, 10));
items.add(new Item("Moscú", 20, 10));
items.add(new Item("Taiwan", 23, 10));
items.add(new Item("Tenerife", 17, 10));
items.add(new Item("Madrid", 18, 10));
items.add(new Item("California", 10, 10));
items.add(new Item("Moscú", 20, 10));
items.add(new Item("Taiwan", 23, 10));
items.add(new Item("Tenerife", 17, 10));
items.add(new Item("Madrid", 18, 10));
items.add(new Item("California", 10, 10));
items.add(new Item("Moscú", 20, 10));
items.add(new Item("Taiwan", 23, 10));
items.add(new Item("Tenerife", 17, 10));
adapter.addAll(items);
adapter.notifyDataSetChanged();
}
示例3: initializeRenderers
import com.pedrogomez.renderers.RendererBuilder; //导入依赖的package包/类
private void initializeRenderers() {
RendererBuilder<Trace> tracesRendererBuilder = new TraceRendererBuilder(lynxConfig);
adapter = new RendererAdapter<>(tracesRendererBuilder);
adapter.addAll(presenter.getCurrentTraces());
if (adapter.getCount() > 0) {
adapter.notifyDataSetChanged();
}
lv_traces.setAdapter(adapter);
}
示例4: ChapterViewModelRendererAdapter
import com.pedrogomez.renderers.RendererBuilder; //导入依赖的package包/类
public ChapterViewModelRendererAdapter(LayoutInflater layoutInflater,
RendererBuilder rendererBuilder, AdapteeCollection<ChapterViewModel> collection) {
super(layoutInflater, rendererBuilder, collection);
}
示例5: ChapterRendererAdapter
import com.pedrogomez.renderers.RendererBuilder; //导入依赖的package包/类
public ChapterRendererAdapter(LayoutInflater layoutInflater, RendererBuilder rendererBuilder,
AdapteeCollection<Chapter> collection) {
super(layoutInflater, rendererBuilder, collection);
}
示例6: initializeAdapter
import com.pedrogomez.renderers.RendererBuilder; //导入依赖的package包/类
private void initializeAdapter() {
RendererBuilder<SpeakerViewModel> rendererBuilder = new SpeakerRendererBuilder(presenter);
speakersCollection = new SpeakersAdapteeCollection();
speakersAdapter = new RVRendererAdapter<>(rendererBuilder, speakersCollection);
}
示例7: initializeAdapter
import com.pedrogomez.renderers.RendererBuilder; //导入依赖的package包/类
private void initializeAdapter() {
RendererBuilder<SessionSummaryViewModel> rendererBuilder = new SpeakerSessionSummaryRendererBuilder(presenter);
speakerSessionsCollection = new SpeakerSessionsAdapteeCollection();
sessionsAdapter = new RVRendererAdapter<>(rendererBuilder, speakerSessionsCollection);
}
示例8: initializeAdapter
import com.pedrogomez.renderers.RendererBuilder; //导入依赖的package包/类
private void initializeAdapter() {
RendererBuilder<SessionViewModel> rendererBuilder = new SessionRendererBuilder(presenter);
sessionsCollection = new SessionsAdapteeCollection();
sessionsAdapter = new RVRendererAdapter<>(rendererBuilder, sessionsCollection);
}
示例9: initializeAdapter
import com.pedrogomez.renderers.RendererBuilder; //导入依赖的package包/类
private void initializeAdapter() {
RendererBuilder<RoomViewModel> rendererBuilder = new RoomRendererBuilder(presenter);
roomsCollection = new RoomsAdapteeCollection();
roomsAdapter = new RVRendererAdapter<>(rendererBuilder, roomsCollection);
}
示例10: initializeAdapter
import com.pedrogomez.renderers.RendererBuilder; //导入依赖的package包/类
private void initializeAdapter() {
RendererBuilder<SessionSummaryViewModel> rendererBuilder = new RoomSessionSummaryRendererBuilder(presenter);
roomSessionsCollection = new RoomSessionsAdapteeCollection();
sessionsAdapter = new RVRendererAdapter<>(rendererBuilder, roomSessionsCollection);
}
示例11: InventoryItemRVRendererAdapter
import com.pedrogomez.renderers.RendererBuilder; //导入依赖的package包/类
public InventoryItemRVRendererAdapter(LayoutInflater layoutInflater,
RendererBuilder<InventoryViewModel> rendererBuilder,
AdapteeCollection<InventoryViewModel> collection) {
super(layoutInflater, rendererBuilder, collection);
}
示例12: ProductRVRendererAdapter
import com.pedrogomez.renderers.RendererBuilder; //导入依赖的package包/类
public ProductRVRendererAdapter(LayoutInflater layoutInflater,
RendererBuilder<ProductSearchViewModel> rendererBuilder,
AdapteeCollection<ProductSearchViewModel> collection) {
super(layoutInflater, rendererBuilder, collection);
}
示例13: withConvertView
import com.pedrogomez.renderers.RendererBuilder; //导入依赖的package包/类
protected RendererBuilder withConvertView(View convertView) {
super.withConvertView(convertView);
this.mConvertView = convertView;
return this;
}