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:com.example.jiang.myrecyclerviewdemo.adapter.RecyclerListAdapter.java

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

From source file:com.knight.arch.adapter.HotReposDetailsListAdapterHolder.java

@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
    final LayoutInflater mInflater = LayoutInflater.from(parent.getContext());
    final View sView = mInflater.inflate(R.layout.hot_repos_details_single_list_item, parent, false);
    return new ViewHolder(sView);
}

From source file:com.rks.musicx.ui.adapters.RemoveTabAdapter.java

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

From source file:com.robert.dagger2demo.adapter.CategoryAdapter.java

@Override
public CategoryViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
    final View itemView = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_category, parent,
            false);// w  ww  . j  ava2s  . c  o m
    return new CategoryViewHolder(itemView);
}

From source file:com.davidecirillo.multichoicesample.sampleToolbar.MySampleToolbarAdapter.java

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

From source file:com.knight.arch.adapter.GitHubUserRankListAdapterHolder.java

@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
    final LayoutInflater mInflater = LayoutInflater.from(parent.getContext());
    final View sView = mInflater.inflate(R.layout.github_user_rank_single_list_item, parent, false);
    return new ViewHolder(sView);
}

From source file:com.knight.arch.adapter.HotReposListAdapterHolder.java

@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
    final LayoutInflater mInflater = LayoutInflater.from(parent.getContext());
    final View sView = mInflater.inflate(R.layout.hot_repos_single_list_item, parent, false);
    return new ViewHolder(sView);
}

From source file:com.veniosg.dir.android.dialog.DetailsDialog.java

private void addSizeDetailsItem(ViewGroup container) {
    from(container.getContext()).inflate(R.layout.item_details, container);
    TextView valueView = (TextView) getLastChild(container);

    ((TextView) getChildAtFromEnd(container, 1)).setText(R.string.details_size);
    valueView.setText(R.string.loading);
    new SizeRefreshTask((TextView) getLastChild(container)).execute();
}

From source file:com.veniosg.dir.android.dialog.DetailsDialog.java

private void addResolutionDetailsItem(ViewGroup container) {
    from(container.getContext()).inflate(R.layout.item_details, container);
    TextView valueView = (TextView) getLastChild(container);

    ((TextView) getChildAtFromEnd(container, 1)).setText(R.string.details_resolution);
    valueView.setText(R.string.loading);
    new ResolutionRefreshTask(valueView).execute();
}

From source file:com.xinheng.crash.CrashListAdapter.java

@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int i) {
    View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.list_item_crash_cat, parent, false);
    return new ViewHolder(v);
}