List of usage examples for android.content Context LAYOUT_INFLATER_SERVICE
String LAYOUT_INFLATER_SERVICE
To view the source code for android.content Context LAYOUT_INFLATER_SERVICE.
Click Source Link
From source file:cl.smartcities.isci.transportinspector.adapters.dialogAdapters.BusSelectionAdapter.java
public BusSelectionAdapter(Context context, ArrayList<String> serviceList, HashMap<String, ArrayList<Bus>> busMap, ListViewAdapterListener listener) { super(context, R.layout.bus_selection_dialog_bus_row, serviceList); this.serviceList = serviceList; this.listener = listener; this.busMap = busMap; this.activeDropdown = new DropDownButton(getContext()); this.activeDropdown.setActive(); this.inactiveDropdown = new DropDownButton(getContext()); this.inactiveDropdown.setInactive(R.color.even_row, R.color.odd_row); this.inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); }
From source file:com.imobilize.blogposts.adapters.ArticlesArrayAdapter.java
@Override public View getView(int position, View convertView, ViewGroup parent) { View v = convertView;// ww w . j a v a 2s . co m ViewHolder viewHolder; if (v == null) { LayoutInflater inflater = (LayoutInflater) getContext() .getSystemService(Context.LAYOUT_INFLATER_SERVICE); v = inflater.inflate(R.layout.listview_layout, null); viewHolder = new ViewHolder(); viewHolder.articleImage = (NetworkImageView) v.findViewById(R.id.articleImage); viewHolder.articleTitle = (TextView) v.findViewById(R.id.articleTitle); viewHolder.articleDescription = (TextView) v.findViewById(R.id.articleDescription); viewHolder.articleMetadata = (TextView) v.findViewById(R.id.articleMetadata); v.setTag(viewHolder); } else { viewHolder = (ViewHolder) v.getTag(); } Article article = articles.get(position); if (article != null) { viewHolder.articleImage.setImageUrl( Constants.blogHostAndPort + Constants.blogURLFirstPart + article.getKey(), ImageCacheManager.getInstance().getImageLoader()); viewHolder.articleTitle.setText(article.getTitle()); viewHolder.articleDescription.setText(article.getDescription()); viewHolder.articleMetadata .setText("Posted by " + article.getAuthor() + " on " + article.getCreationDate()); viewHolder.articleContent = article.getContent(); viewHolder.articleKey = article.getKey(); } return v; }
From source file:com.kk.binding.adapter.SimpleBindPagerAdapter.java
@Override public Object instantiateItem(ViewGroup container, int position) { viewPager = container;//from w w w . ja va2s. c o m if (position >= mData.size()) return null; BindLog.d(TAG, "instantiateItem " + "\n position = " + position + "\n data = " + mData.get(position)); LayoutInflater layoutInflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE); View v = layoutInflater.inflate(mResId, null); BindViewUtil.setDataContext(v, mData.get(position)); container.addView(v); return v; }
From source file:com.facebook.android.friendsmash.RequestUserArrayAdapter.java
@Override public View getView(int position, View convertView, ViewGroup parent) { LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); View listItemView = inflater.inflate(R.layout.request_list_item_view, parent, false); ProfilePictureView profilePicView = (ProfilePictureView) listItemView .findViewById(R.id.requestListItemProfilePic); TextView nameView = (TextView) listItemView.findViewById(R.id.requestListItemName); final ImageView checkBox = (ImageView) listItemView.findViewById(R.id.requestListItemCheckbox); JSONObject currentUser = users.get(position); profilePicView.setProfileId(currentUser.optString("id")); profilePicView.setCropped(true);//from www .ja v a2 s. co m nameView.setText(currentUser.optString("first_name")); checkBox.setOnTouchListener(new View.OnTouchListener() { boolean checked = false; @Override public boolean onTouch(View v, MotionEvent event) { // toggle image if (checked) { checked = false; checkBox.setImageResource(R.drawable.checkbox_cold); } else { checked = true; checkBox.setImageResource(R.drawable.checkbox_hot); } return false; } }); return listItemView; }
From source file:com.battlelancer.seriesguide.adapters.MoviesCursorAdapter.java
public MoviesCursorAdapter(Context context, PopupMenuClickListener popupMenuClickListener) { super(context, null, 0); mLayoutInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); mPopupMenuClickListener = popupMenuClickListener; // figure out which size of posters to load based on screen density if (DisplaySettings.isVeryHighDensityScreen(context)) { mImageBaseUrl = TmdbSettings.getImageBaseUrl(context) + TmdbSettings.POSTER_SIZE_SPEC_W342; } else {/*from ww w . ja va 2s. com*/ mImageBaseUrl = TmdbSettings.getImageBaseUrl(context) + TmdbSettings.POSTER_SIZE_SPEC_W154; } }
From source file:com.jbirdvegas.mgerrit.cards.PatchSetReviewersCard.java
public PatchSetReviewersCard(Context context, RequestQueue requestQueue) { mRequestQueue = requestQueue;//from ww w .j a va 2 s .c o m mContext = context; mActivity = (FragmentActivity) mContext; mInflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE); }
From source file:org.mifos.androidclient.util.listadapters.SimpleListAdapter.java
@Override public View getView(int position, View convertView, ViewGroup parent) { View row;/* w ww.j a va 2 s. c o m*/ if (convertView == null) { LayoutInflater inflater = (LayoutInflater) getContext() .getSystemService(Context.LAYOUT_INFLATER_SERVICE); row = inflater.inflate(R.layout.simple_list_item, parent, false); } else { row = convertView; } SimpleListItem item = getItem(position); if (item != null) { TextView label = (TextView) row.findViewById(R.id.simple_list_item_label); label.setText(item.getListLabel()); } return row; }
From source file:com.karthikb351.vitinfo2.customwidget.ScheduleView.java
private void initialize() { LayoutInflater layoutInflater = (LayoutInflater) getContext() .getSystemService(Context.LAYOUT_INFLATER_SERVICE); layoutInflater.inflate(R.layout.schedule_widget, this, true); timeLineView = (TimeLineView) findViewById(R.id.timeline); tvTime = (TextView) findViewById(R.id.tvTime); tvTimeAMPM = (TextView) findViewById(R.id.tvTimeAMPM); tvCourseName = (TextView) findViewById(R.id.tvCourseName); tvVenue = (TextView) findViewById(R.id.tvVenue); progressAttendance = (NumberProgressBar) findViewById(R.id.progressAttendance); progressAttendance.setProgressTextColor(ContextCompat.getColor(getContext(), R.color.text_secondary)); progressAttendance.setReachedBarColor(ContextCompat.getColor(getContext(), R.color.text_secondary)); progressAttendance.setMax(100);/* ww w .j a va 2 s.c o m*/ progressAttendance.setProgress(0); }
From source file:com.capricorn.ArcMenu.java
private void init(Context context) { LayoutInflater li = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); li.inflate(R.layout.arc_menu, this); mArcLayout = (ArcLayout) findViewById(R.id.item_layout); final ViewGroup controlLayout = (ViewGroup) findViewById(R.id.control_layout); controlLayout.setClickable(true);//from w w w.j ava 2s .c om controlLayout.setOnTouchListener(new OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { if (event.getAction() == MotionEvent.ACTION_DOWN) { if (userOnTouch != null) userOnTouch.onTouch(v, event); mHintView.startAnimation(createHintSwitchAnimation(mArcLayout.isExpanded())); mArcLayout.switchState(true); } return false; } }); mHintView = (ImageView) findViewById(R.id.control_hint); }
From source file:com.flowzr.budget.holo.activity.AbstractEditorActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Setup ActionBar getSupportActionBar().setDisplayHomeAsUpEnabled(true); LayoutInflater layoutInflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE); NodeInflater nodeInflater = new NodeInflater(layoutInflater); x = new ActivityLayout(nodeInflater, this); db = new DatabaseAdapter(this); db.open();/*from w w w. jav a 2s .c om*/ em = db.em(); }