List of usage examples for android.view ViewGroup findViewById
@Nullable public final <T extends View> T findViewById(@IdRes int id)
From source file:gr.sepals.eshop.info.gui.BalconySlidePageFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { ViewGroup rootView = (ViewGroup) inflater.inflate(R.layout.fragment_info_balcony, container, false); title = (TextView) rootView.findViewById(R.id.info_balcony_title_textview); desc = (TextView) rootView.findViewById(R.id.info_balcony_description_textview); Typeface titleFont = Typeface.createFromAsset(getActivity().getAssets(), "fonts/GFS_Pyrsos.otf"); Typeface descFont = Typeface.createFromAsset(getActivity().getAssets(), "fonts/GFS_Goschen-Italic.otf"); title.setTypeface(titleFont, Typeface.BOLD); desc.setTypeface(descFont);//from w ww .j a va 2 s . c om return rootView; }
From source file:gr.sepals.eshop.info.gui.NetworkSlidePageFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { ViewGroup rootView = (ViewGroup) inflater.inflate(R.layout.fragment_info_network, container, false); title = (TextView) rootView.findViewById(R.id.info_network_title_textview); desc = (TextView) rootView.findViewById(R.id.info_network_description_textview); Typeface titleFont = Typeface.createFromAsset(getActivity().getAssets(), "fonts/GFS_Pyrsos.otf"); Typeface descFont = Typeface.createFromAsset(getActivity().getAssets(), "fonts/GFS_Goschen-Italic.otf"); title.setTypeface(titleFont, Typeface.BOLD); desc.setTypeface(descFont);//from w w w . j a va2 s .c o m return rootView; }
From source file:gr.sepals.eshop.info.gui.ProductsSlidePageFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { ViewGroup rootView = (ViewGroup) inflater.inflate(R.layout.fragment_info_products, container, false); title = (TextView) rootView.findViewById(R.id.info_products_title_textview); desc = (TextView) rootView.findViewById(R.id.info_products_description_textview); Typeface titleFont = Typeface.createFromAsset(getActivity().getAssets(), "fonts/GFS_Pyrsos.otf"); Typeface descFont = Typeface.createFromAsset(getActivity().getAssets(), "fonts/GFS_Goschen-Italic.otf"); title.setTypeface(titleFont, Typeface.BOLD); desc.setTypeface(descFont);/*from w w w. ja va2s. c o m*/ return rootView; }
From source file:com.hhs.hfnavigator.slidingtabs.harbinger.SportsFragment.java
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { ViewGroup root = (ViewGroup) inflater.inflate(R.layout.fragment_webview, null); WebView webView = (WebView) root.findViewById(R.id.webView); if (webView != null) { webView.setWebViewClient(new WebViewClient()); webView.loadUrl("http://www.harbingernews.net/sports"); webView.getSettings().setJavaScriptEnabled(true); webView.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE); webView.getSettings().setBuiltInZoomControls(true); }/*from w w w.j a v a 2 s .c o m*/ return root; }
From source file:com.hacktx.android.fragments.TwitterFragment.java
private void setupTwitter(ViewGroup root) { twitterListView = (ListView) root.findViewById(R.id.twitterList); updateTwitterTimeline(); }
From source file:com.dev.campus.event.EventFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { ViewGroup rootView = (ViewGroup) inflater.inflate(R.layout.fragment_event, container, false); ((TextView) rootView.findViewById(R.id.event_view_title)).setText(mEvent.getTitle()); ((TextView) rootView.findViewById(R.id.event_view_category)).setText(mEvent.getCategory()); ((TextView) rootView.findViewById(R.id.event_view_date)).setText(mEvent.getStringDate()); TextView detailsView = (TextView) rootView.findViewById(R.id.event_view_details); detailsView.setText(Html.fromHtml(mEvent.getDetails())); Linkify.addLinks(detailsView, Linkify.EMAIL_ADDRESSES); detailsView.setMovementMethod(LinkMovementMethod.getInstance()); return rootView; }
From source file:com.paras.amazonadvertice.ImageGalleryFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { setRetainInstance(true);//from w ww . ja va 2 s . com final ViewGroup rootView = (ViewGroup) inflater.inflate(R.layout.image_fragment, container, false); final ImageView imageView = (ImageView) rootView.findViewById(R.id.image_view); imageView.setImageResource(this.imageResource); return rootView; }
From source file:gr.sepals.eshop.info.gui.ThanksSlidePageFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { ViewGroup rootView = (ViewGroup) inflater.inflate(R.layout.fragment_info_thanks, container, false); title = (TextView) rootView.findViewById(R.id.info_thanks_title_textview); Typeface titleFont = Typeface.createFromAsset(getActivity().getAssets(), "fonts/GFS_Pyrsos.otf"); title.setTypeface(titleFont, Typeface.BOLD); CheckBox hideInfo = (CheckBox) rootView.findViewById(R.id.hide_info_checkBox); Typeface descFont = Typeface.createFromAsset(getActivity().getAssets(), "fonts/GFS_Goschen-Italic.otf"); hideInfo.setTypeface(descFont);//from w ww . j a va 2 s . c o m hideInfo.setOnCheckedChangeListener(this); // update the fragment content hideInfo.setChecked(Settings.getBoolean(getActivity(), InternalDatabaseKeys.HIDE_INTRO_INFO, false)); return rootView; }
From source file:org.ayo.robot.anim.transitioneverywhere.RotateSample.java
@Nullable @Override/*from w w w . j ava 2s . c o m*/ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_rotate, container, false); final ViewGroup transitionsContainer = (ViewGroup) view.findViewById(R.id.transitions_container); final View icon = transitionsContainer.findViewById(R.id.icon); icon.setOnClickListener(new View.OnClickListener() { boolean mRotated; @Override public void onClick(View v) { TransitionManager.beginDelayedTransition(transitionsContainer, new Rotate()); mRotated = !mRotated; icon.setRotation(mRotated ? 135 : 0); } }); return view; }
From source file:com.hacktx.android.fragments.TwitterFragment.java
private void setupSwipeRefreshLayout(ViewGroup root) { swipeRefreshLayout = (SwipeRefreshLayout) root.findViewById(R.id.swipeRefreshLayout); swipeRefreshLayout.setColorSchemeResources(R.color.primary, R.color.hacktx_blue); swipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() { @Override//from w w w . j a va 2 s .c om public void onRefresh() { updateTwitterTimeline(); swipeRefreshLayout.setRefreshing(false); } }); }