Example usage for android.view ViewGroup getContext

List of usage examples for android.view ViewGroup getContext

Introduction

In this page you can find the example usage for android.view ViewGroup getContext.

Prototype

@ViewDebug.CapturedViewProperty
public final Context getContext() 

Source Link

Document

Returns the context the view is running in, through which it can access the current theme, resources, etc.

Usage

From source file:ca.appvelopers.mcgillmobile.ui.ebill.EbillAdapter.java

@Override
public StatementHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
    return new StatementHolder(
            LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.item_statement, viewGroup, false));
}

From source file:com.example.mayankgupta.todo.RecyclerListAdapter.java

@Override
public ItemViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
    View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_main, parent, false);
    mItems = addItem.getTitleList();//  ww  w  . ja v a 2 s. c o m
    ItemViewHolder itemViewHolder = new ItemViewHolder(view);
    return itemViewHolder;
}

From source file:de.kuschku.quasseldroid_ng.ui.coresettings.identity.nick.IdentityNickAdapter.java

@Override
public IdentityNickViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
    LayoutInflater inflater = LayoutInflater.from(parent.getContext());
    View view = inflater.inflate(R.layout.widget_identitynick, parent, false);
    return new IdentityNickViewHolder(view);
}

From source file:com.ihandy.a2014011373.manage_category.ItemAdapter.java

@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
    final View view = LayoutInflater.from(parent.getContext()).inflate(mLayoutId, parent, false);
    ImageView image = (ImageView) view.findViewById(R.id.image);
    if (!isWatched)
        image.setVisibility(View.INVISIBLE);
    Button button = (Button) view.findViewById(R.id.button);
    button.setTag(getItemId(count));/*from   w  w  w.  j  a v  a 2  s  .  co m*/
    count++;
    button.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            CategoryTab categoryTab = (CategoryTab) removeItem(getPositionForItemId((long) v.getTag()));
            anotherAdapter.addItem(0, categoryTab);
            activity.fragmentChanged();
            //Toast.makeText(v.getContext(), " " + v.getTag(), Toast.LENGTH_SHORT).show();getPositionForItemId((long) v.getTag())
        }
    });
    return new ViewHolder(view);
}

From source file:com.mifos.mifosxdroid.adapters.GroupNameListAdapter.java

@Override
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
    RecyclerView.ViewHolder vh;//  w  w  w. j  a  v  a  2s  . com
    View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.row_group_name, parent, false);
    vh = new ViewHolder(v);
    return vh;
}

From source file:com.agna.setmaster.ui.screen.profile.condition.ConditionSetPagerAdapter.java

@Override
public Object instantiateItem(ViewGroup container, int position) {
    ConditionSetView conditionSetView = (ConditionSetView) LayoutInflater.from(container.getContext())
            .inflate(R.layout.condition_set_view, container, false);
    conditionSetView.showConditionSet(conditionSets.get(position));
    conditionSetView.setOnConditionActionListener(innerOnConditionActionListener);
    container.addView(conditionSetView);
    return conditionSetView;
}

From source file:com.luorrak.ouroboros.catalog.NavigationBoardListAdapter.java

@Override
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
    View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.board_list_item, parent, false);
    return new NavigationBoardListViewHolder(view);
}

From source file:com.markupartist.sthlmtraveling.ui.adapter.NearbyAdapter.java

@Override
public NearbyStopViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
    return new NearbyStopViewHolder(
            LayoutInflater.from(parent.getContext()).inflate(R.layout.row_icon_two_rows, parent, false));
}

From source file:com.akhbulatov.wordkeeper.adapter.WordAdapter.java

@NonNull
@Override//from  w w  w.j  av a2s. c o m
public WordViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
    View itemView = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_word, parent, false);
    return new WordViewHolder(itemView);
}

From source file:com.hhwt.travelplanner.adapter.VotePageadapter.java

@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
    View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.adapter_vote_now, parent, false);
    mContext = parent.getContext();/*from   w w  w  . j a  va 2 s .co m*/
    //   Thread.setDefaultUncaughtExceptionHandler(new ACRA_Page(mContext));
    return new ViewHolder(v);
}