Example usage for android.content Context LAYOUT_INFLATER_SERVICE

List of usage examples for android.content Context LAYOUT_INFLATER_SERVICE

Introduction

In this page you can find the example usage for android.content Context LAYOUT_INFLATER_SERVICE.

Prototype

String LAYOUT_INFLATER_SERVICE

To view the source code for android.content Context LAYOUT_INFLATER_SERVICE.

Click Source Link

Document

Use with #getSystemService(String) to retrieve a android.view.LayoutInflater for inflating layout resources in this context.

Usage

From source file:com.battlelancer.seriesguide.adapters.SearchResultsAdapter.java

public SearchResultsAdapter(Context context, Cursor c, int flags) {
    super(context, c, flags);
    mLayoutInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
}

From source file:au.com.wallaceit.reddinator.SimpleTabsWidget.java

public SimpleTabsWidget(Context context, LinearLayout tabView) {
    inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    tabWidget = tabView;//  www  . j  a  v a2 s .c o  m
    //tabs = (TableRow) tabWidget.findViewById(R.id.tabs);
    //indicators = (TableRow) tabWidget.findViewById(R.id.indicators);
}

From source file:com.granita.tasks.utils.TasksListCursorSpinnerAdapter.java

public TasksListCursorSpinnerAdapter(Context context) {
    super(context, null, 0 /* don't register a content observer to avoid a context leak! */);
    mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    mView = R.layout.list_spinner_item_selected;
    mDropDownView = R.layout.list_spinner_item_dropdown;
}

From source file:ac.robinson.bettertogether.QRPopupWindow.java

@SuppressLint("InflateParams")
QRPopupWindow(View anchorView) {/*from  w  w  w  .  j a  v  a2 s.  c  om*/
    mAnchorView = anchorView;
    mWindowManager = (WindowManager) mAnchorView.getContext().getSystemService(Context.WINDOW_SERVICE);
    mPopupWindow = new PopupWindow(mAnchorView.getContext());

    LayoutInflater inflater = (LayoutInflater) mAnchorView.getContext()
            .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    mPopupWindow.setContentView(inflater.inflate(R.layout.dialog_qr_code, null));

    mPopupWindow.setTouchInterceptor(new View.OnTouchListener() {
        @Override
        public boolean onTouch(View view, MotionEvent event) {
            dismissPopUp();
            return true;
        }
    });
}

From source file:com.orange.ocara.ui.activity.IllustrationsActivity.java

@AfterViews
protected void setUpViewFlipper() {

    updateArrows(selectedIndex);/*from   www.j a v a 2  s.co m*/
    int nbIllustrations = titles.length;
    for (int i = 0; i < nbIllustrations; i++) {
        LayoutInflater inflater = (LayoutInflater) this.getSystemService((Context.LAYOUT_INFLATER_SERVICE));
        View view = inflater.inflate(com.orange.ocara.R.layout.illustration, null);
        viewFlipper.addView(view);
        commentPicture = (TextView) view.findViewById(com.orange.ocara.R.id.comment_picture);
        photo = (ImageView) view.findViewById(com.orange.ocara.R.id.photo);

        if (!StringUtils.isEmpty(comments[i])) {
            commentPicture.setText(comments[i]);
        }

        if (!StringUtils.isEmpty(images[i])) {
            picasso.load(images[i]).placeholder(com.orange.ocara.R.color.black50).fit().into(photo);
        }

    }

    viewFlipper.setDisplayedChild(selectedIndex);

    leftButton.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            viewFlipper.showPrevious();
            Timber.v("index " + viewFlipper.indexOfChild(viewFlipper.getCurrentView()));
            int index = viewFlipper.indexOfChild(viewFlipper.getCurrentView());
            updateTitle(index);
            updateArrows(index);
        }
    });

    rightButton.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            viewFlipper.showNext();
            Timber.v("index " + viewFlipper.indexOfChild(viewFlipper.getCurrentView()));
            int index = viewFlipper.indexOfChild(viewFlipper.getCurrentView());
            updateTitle(index);
            updateArrows(index);
        }
    });

}

From source file:com.example.mego.adas.main.adapter.HelpPageViewerAdapter.java

public HelpPageViewerAdapter(Context context) {
    mContext = context;
    mLayoutInflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);

}

From source file:net.olejon.mdapp.LvhAdapter.java

public LvhAdapter(Context context, JSONArray jsonArray) {
    mContext = context;

    mLayoutInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);

    mCategories = jsonArray;
}

From source file:com.android.viewflow.ImageAdapter.java

public ImageAdapter(Context context, int[] image, String fromWhere) {
    mContext = context;//from   w  ww.  j  a v a 2 s  . c o m
    mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    images = image;
    this.fromWhere = fromWhere;
}

From source file:com.battlelancer.seriesguide.adapters.SeasonsAdapter.java

public SeasonsAdapter(Context context, Cursor c, int flags, PopupMenuClickListener listener) {
    super(context, c, flags);
    mLayoutInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    mPopupMenuClickListener = listener;/*w w  w . j  a  v a  2  s.  c  o m*/
}

From source file:com.jetheis.android.makeitrain.fragment.AboutDialogFragment.java

@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
    AlertDialog.Builder builder;/*from   w  w w  .  j  av  a  2 s  .c  o m*/
    Activity activity = getActivity();

    LayoutInflater inflater = (LayoutInflater) activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    View layout = inflater.inflate(R.layout.about_dialog_fragment, null);

    TextView text = (TextView) layout.findViewById(R.id.about_dialog_fragment_text_view);
    text.setText(R.string.about_text);

    builder = new AlertDialog.Builder(activity);
    builder.setView(layout);
    builder.setTitle(R.string.about_make_it_rain);
    builder.setPositiveButton(R.string.cool_thanks, null);

    return builder.create();
}