List of usage examples for android.view LayoutInflater inflate
public View inflate(XmlPullParser parser, @Nullable ViewGroup root, boolean attachToRoot)
From source file:org.xbmc.kore.ui.hosts.AddHostFragmentFinish.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { return inflater.inflate(R.layout.fragment_add_host_finish, container, false); }
From source file:com.jiandanbaoxian.fragment.HistoryPriceDetailFragmentTab1.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { return inflater.inflate(R.layout.fragment_history_price_detail_tab1, container, false); }
From source file:com.sawyer.advadapters.app.adapters.nfjsonadapter.MovieNFJSONArrayAdapter.java
@Override public View getView(LayoutInflater inflater, int position, View convertView, ViewGroup parent) { MovieViewHolder vh;/*from ww w .j a v a2 s . c om*/ if (convertView == null) { convertView = inflater.inflate(R.layout.item_movie1, parent, false); vh = new MovieViewHolder(convertView); convertView.setTag(vh); } else { vh = (MovieViewHolder) convertView.getTag(); } try { JSONObject movie = optItemJSONObject(position); vh.title.setText(movie.getString(MovieItem.JSON_TITLE)); vh.subtitle.setText(movie.getString(MovieItem.JSON_YEAR)); vh.icon.setImageResource((movie.getBoolean(MovieItem.JSON_IS_RECOMMENDED)) ? R.drawable.ic_rating_good : R.drawable.ic_rating_bad); } catch (JSONException e) { Log.e(MovieNFJSONArrayAdapter.class.getSimpleName(), "GetView error", e); } return convertView; }
From source file:com.vrem.wifianalyzer.wifi.accesspoint.AccessPointDetail.java
View makeView(View convertView, ViewGroup parent, @NonNull WiFiDetail wiFiDetail, boolean isChild, @NonNull AccessPointViewType accessPointViewType) { MainActivity mainActivity = MainContext.INSTANCE.getMainActivity(); View view = convertView;/*from w ww. j a va 2 s . c om*/ if (view == null) { LayoutInflater layoutInflater = mainActivity.getLayoutInflater(); view = layoutInflater.inflate(accessPointViewType.getLayout(), parent, false); } setViewCompact(mainActivity, view, wiFiDetail, isChild); if (view.findViewById(R.id.capabilities) != null) { setViewExtra(mainActivity, view, wiFiDetail); setViewVendorShort(view, wiFiDetail.getWiFiAdditional()); } return view; }
From source file:com.manning.androidhacks.hack029.fragment.ColorFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { if (container == null) { return null; }/*w w w . j a v a 2s.c o m*/ final View rootView = inflater.inflate(R.layout.color_fragment, container, false); final TextView textView = (TextView) rootView.findViewById(R.id.color_fragment_text); rootView.setBackgroundColor(mColor); textView.setText(mText); return rootView; }
From source file:org.intermine.app.fragment.LogInFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.login_fragment, container, false); ButterKnife.inject(this, view); return view;/* ww w . j a v a 2 s . c o m*/ }
From source file:com.QuarkLabs.BTCeClient.fragments.ActiveOrdersFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { getLoaderManager().initLoader(LOADER_ID, null, this); return inflater.inflate(R.layout.fragment_active_orders, container, false); }
From source file:com.manning.androidhacks.hack040.ImageDetailFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate and locate the main ImageView final View v = inflater.inflate(R.layout.image_detail_fragment, container, false); mImageView = (ImageView) v.findViewById(R.id.imageView); return v;//from w w w . jav a 2 s.co m }
From source file:com.dropbox.android.sample.ResAdapter.java
@Override public View getView(int position, View convertView, ViewGroup parent) { View row = convertView;//ww w . ja va 2 s . c o m DataHolder holder = null; if (row == null) { LayoutInflater inflater = context.getLayoutInflater(); row = inflater.inflate(layoutResourceId, parent, false); holder = new DataHolder(); holder.res_name = (TextView) row.findViewById(R.id.resname); holder.res_delete = (Button) row.findViewById(R.id.button1); holder.res_view = (Button) row.findViewById(R.id.button3); holder.res_update = (Button) row.findViewById(R.id.button2); row.setTag(holder); } else holder = (DataHolder) row.getTag(); String res = getItem(position); holder.res_name.setText(res); holder.res_delete.setOnClickListener(new ResDeleteOnClickListener(res)); holder.res_view.setOnClickListener(new ResViewOnClickListener(res, context.findViewById(R.id.imageView1))); holder.res_update.setOnClickListener(new ResUpdateOnClickListener(res, null)); return row; }
From source file:com.manning.androidhacks.hack047.fragments.ColorFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { if (container == null) { return null; }/* w ww.j a v a 2 s .com*/ final TextView textView = (TextView) inflater.inflate(R.layout.color_fragment, container, false); textView.setBackgroundColor(mColor); textView.setText(mText); return textView; }