List of usage examples for android.view ViewGroup getContext
@ViewDebug.CapturedViewProperty public final Context getContext()
From source file:com.lastsoft.plog.adapter.PlayerAdapter.java
@Override public ViewHolder onCreateViewHolder(ViewGroup viewGroup, int viewType) { // Create a new view. View v = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.player_row_item, viewGroup, false); return new ViewHolder(v); }
From source file:com.murraystudio.murraystudio.ProjectAdapter.java
@Override public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup viewGroup, int viewType) { // Create a new view. View v1 = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.card_item_project, viewGroup, false); return new ViewHolderFirst(v1, context); }
From source file:com.rayman.v2ex.ui.adapter.list.base.BaseListAdapter.java
@Override public final BaseViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { return new BaseViewHolder(buildBinding(LayoutInflater.from(parent.getContext()), parent, viewType)); }
From source file:com.rowland.movies.ui.adapters.MovieAdapter.java
@Override public CustomViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { // Layout to inflate for CustomViewHolder View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.grid_item, parent, false); // Return new new CustomViewHolder return new CustomViewHolder(v); }
From source file:com.vagabond.dealhunting.ui.StoreAdapter.java
@Override public StoreAdapter.StoreAdpaterViewHolder onCreateViewHolder(ViewGroup viewGroup, int viewType) { if (viewGroup instanceof RecyclerView) { int layoutId = R.layout.list_item_store; View view = LayoutInflater.from(viewGroup.getContext()).inflate(layoutId, viewGroup, false); view.setFocusable(true);/* w w w . j a v a 2 s .co m*/ return new StoreAdapter.StoreAdpaterViewHolder(view); } else { throw new RuntimeException("Not bound to RecyclerView"); } }
From source file:com.zzc.androidtrain.recycleview_drag_drop.RecyclerListAdapter.java
@Override public ItemViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { System.out.println("onCreateViewHolder"); View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_main, parent, false); ItemViewHolder itemViewHolder = new ItemViewHolder(view); return itemViewHolder; }
From source file:ca.rmen.android.scrumchatter.meeting.detail.MeetingCursorAdapter.java
@Override public MeetingViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { MeetingMemberListItemBinding binding = DataBindingUtil.inflate(LayoutInflater.from(parent.getContext()), R.layout.meeting_member_list_item, parent, false); binding.getRoot().setTag(binding);/*from ww w .j a v a 2 s .com*/ binding.setListener(mMemberStartStopListener); return new MeetingViewHolder(binding); }
From source file:net.olejon.mdapp.InteractionsCardsAdapter.java
@Override public InteractionsViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) { View view = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.activity_interactions_card, viewGroup, false);/*w w w .ja v a 2 s . co m*/ return new InteractionsViewHolder(view); }
From source file:com.manaschaudhari.android_mvvm.adapters.ViewPagerAdapter.java
@Override public Object instantiateItem(ViewGroup container, int position) { ViewModel vm = latestViewModels.get(position); int layoutId = viewProvider.getView(vm); ViewDataBinding binding = DataBindingUtil.inflate(LayoutInflater.from(container.getContext()), layoutId, container, false);//from ww w .j a v a 2s.c o m binder.bind(binding, vm); container.addView(binding.getRoot()); return binding; }
From source file:com.github.kubatatami.InternalSteppersAdapter.java
@Override public SteppersViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { return new SteppersViewHolder( LayoutInflater.from(parent.getContext()).inflate(R.layout.item_steppers, parent, false)); }