Example usage for android.view LayoutInflater from

List of usage examples for android.view LayoutInflater from

Introduction

In this page you can find the example usage for android.view LayoutInflater from.

Prototype

public static LayoutInflater from(Context context) 

Source Link

Document

Obtains the LayoutInflater from the given context.

Usage

From source file:com.manning.androidhacks.hack043.adapter.BatchAdapter.java

public BatchAdapter(Context context, Cursor c) {
    super(context, c, true);
    mInflater = LayoutInflater.from(context);

    mIdIndex = c.getColumnIndexOrThrow(BatchNumbersContentProvider.COLUMN_ID);
    mNumberIndex = c.getColumnIndexOrThrow(BatchNumbersContentProvider.COLUMN_TEXT);
}

From source file:com.dmbstream.android.adapter.ConcertListAdapter.java

public ConcertListAdapter(Context context) {
    super(context, R.layout.partial_concert_list_item);
    if (context instanceof RootActivity) {
        rootActivity = (RootActivity) context;
    }//from   w ww .j  a v  a  2  s  . co m
    inflater = LayoutInflater.from(getContext());
}

From source file:com.manning.androidhacks.hack043.adapter.NoBatchAdapter.java

public NoBatchAdapter(Context context, Cursor c) {
    super(context, c, true);
    mInflater = LayoutInflater.from(context);

    mIdIndex = c.getColumnIndexOrThrow(NoBatchNumbersContentProvider.COLUMN_ID);
    mNumberIndex = c.getColumnIndexOrThrow(NoBatchNumbersContentProvider.COLUMN_TEXT);
}

From source file:com.manning.androidhacks.hack027.NumbersAdapter.java

public NumbersAdapter(Context context, List<Integer> objects) {
    super(context, 0, objects);
    mInflator = LayoutInflater.from(context);
}

From source file:com.vmihalachi.turboeditor.adapter.AdapterDetailedList.java

public AdapterDetailedList(final Context context, final LinkedList<FileDetail> fileDetails,
        final boolean isRoot) {
    super(context, R.layout.item_file_list, fileDetails);
    this.fileDetails = fileDetails;
    this.inflater = LayoutInflater.from(context);
    if (!isRoot) {
        this.fileDetails.addFirst(new FileDetail("..", context.getString(R.string.folder), ""));
    } else {//w w w.  j av  a2s .  c  om
        this.fileDetails.addFirst(
                new FileDetail(context.getString(R.string.home), context.getString(R.string.folder), ""));
    }
}

From source file:com.manning.androidhacks.hack043.adapter.SQLContentProviderAdapter.java

public SQLContentProviderAdapter(Context context, Cursor c) {
    super(context, c, true);
    mInflater = LayoutInflater.from(context);

    mIdIndex = c.getColumnIndexOrThrow(MySQLContentProvider.COLUMN_ID);
    mNumberIndex = c.getColumnIndexOrThrow(MySQLContentProvider.COLUMN_TEXT);
}

From source file:com.manning.androidhacks.hack030.view.CountryView.java

public CountryView(Context context, AttributeSet attrs) {
    super(context, attrs);
    LayoutInflater inflater = LayoutInflater.from(context);
    View v = inflater.inflate(R.layout.country_view, this, true);
    mTitle = (TextView) v.findViewById(R.id.country_view_title);
    mCheckBox = (CheckBox) v.findViewById(R.id.country_view_checkbox);
}

From source file:com.BeeFramework.adapter.DebugListAdapter.java

public DebugListAdapter(Context context) {
    this.context = context;
    inflater = LayoutInflater.from(context);
}

From source file:com.siso.app.adapter.MarketListAdapter.java

public MarketListAdapter(Context context, List<GoodsEntity> data, int resource, int type) {
    this.context = context;
    this.listContainer = LayoutInflater.from(context);
    this.itemViewResource = resource;
    this.listItems = data;
    this.type = type;
}

From source file:arun.com.chromer.webheads.ui.context.WebsiteAdapter.java

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