List of usage examples for android.view ViewGroup findViewById
@Nullable public final <T extends View> T findViewById(@IdRes int id)
From source file:angeloid.dreamnarae.Save_Main.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { ViewGroup root = (ViewGroup) inflater.inflate(R.layout.tab_tab2_save_install, null); savei = (Button) root.findViewById(R.id.tab_tab2_save_reboot_ok); saveii = (Button) root.findViewById(R.id.tab_tab2_save_reboot_no); savei.setTypeface(Tab_MainActivity.Fonts.THEOREM); saveii.setTypeface(Tab_MainActivity.Fonts.THEOREM); progresstext_save = (TextView) root.findViewById(R.id.tab_tab2_save_running); usercheck_save = (ImageView) root.findViewById(R.id.tab_tab2_save_usercheck); progresstext_save.setTypeface(Tab_MainActivity.Fonts.THEOREM); // // w w w. j a v a 2s. c o m if (new File("/system/98banner_dreamnarae_save").exists()) { usercheck_save.setImageResource(R.drawable.apply); savei.setEnabled(false); savei.setFocusable(false); saveii.setEnabled(false); saveii.setFocusable(false); progresstext_save.setText(R.string.tab_tab2_installed); } else { usercheck_save.setImageResource(R.drawable.not_apply); } savei.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { // TODO v.postDelayed(new Runnable() { public void run() { DialogProgress(false); } }, 10); // 0.01 } }); saveii.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { // TODO v.postDelayed(new Runnable() { public void run() { DialogProgress2(false); } }, 10); // 0.01 } }); return root; }
From source file:net.olejon.mdapp.MedicationsFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { ViewGroup viewGroup = (ViewGroup) inflater.inflate(R.layout.fragment_medications, container, false); // Context//from w w w. j a v a 2s .co m mContext = viewGroup.getContext(); // Tools mTools = new MyTools(mContext); // Search mSearchEditText = (EditText) getActivity().findViewById(R.id.main_search_edittext); // List mListView = (ListView) viewGroup.findViewById(R.id.main_medications_list); mListViewEmpty = viewGroup.findViewById(R.id.main_medications_list_empty); // Get medications GetMedicationsTask getMedicationsTask = new GetMedicationsTask(); getMedicationsTask.execute(); return viewGroup; }
From source file:angeloid.dreamnarae.SPiCa_Main.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { ViewGroup root = (ViewGroup) inflater.inflate(R.layout.tab_tab2_spica_install, null); spicai = (Button) root.findViewById(R.id.tab_tab2_spica_reboot_ok); spicaii = (Button) root.findViewById(R.id.tab_tab2_spica_reboot_no); spicai.setTypeface(Tab_MainActivity.Fonts.THEOREM); spicaii.setTypeface(Tab_MainActivity.Fonts.THEOREM); progresstext_spica = (TextView) root.findViewById(R.id.tab_tab2_spica_running); usercheck_spica = (ImageView) root.findViewById(R.id.tab_tab2_spica_usercheck); progresstext_spica.setTypeface(Tab_MainActivity.Fonts.THEOREM); if (new File("/system/98banner_dreamnarae_spica").exists()) { usercheck_spica.setImageResource(R.drawable.apply); spicai.setEnabled(false);//from w w w. j a v a2 s . c o m spicai.setFocusable(false); spicaii.setEnabled(false); spicaii.setFocusable(false); progresstext_spica.setText(R.string.tab_tab2_installed); } else { usercheck_spica.setImageResource(R.drawable.not_apply); } spicai.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { // TODO v.postDelayed(new Runnable() { public void run() { DialogProgress(false); } }, 10); // 0.01 } }); spicaii.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { // TODO v.postDelayed(new Runnable() { public void run() { DialogProgress2(false); } }, 10); // 0.01 } }); return root; }
From source file:com.andrew.apollo.ui.fragments.QueueFragment.java
/** * {@inheritDoc}/*from w w w .ja v a 2 s .c o m*/ */ @Override public View onCreateView(final LayoutInflater inflater, final ViewGroup container, final Bundle savedInstanceState) { // The View for the fragment's UI final ViewGroup rootView = (ViewGroup) inflater.inflate(R.layout.list_base, null); // Initialize the list mListView = (DragSortListView) rootView.findViewById(R.id.list_base); // Set the data behind the list mListView.setAdapter(mAdapter); // Release any references to the recycled Views mListView.setRecyclerListener(new RecycleHolder()); // Listen for ContextMenus to be created mListView.setOnCreateContextMenuListener(this); // Play the selected song mListView.setOnItemClickListener(this); // Set the drop listener mListView.setDropListener(this); // Set the swipe to remove listener mListView.setRemoveListener(this); // Quick scroll while dragging mListView.setDragScrollProfile(this); return rootView; }
From source file:io.vit.vitio.Fragments.TimeTable.TimeTableFragment.java
private void init(ViewGroup rootView) { mDate = (TextView) rootView.findViewById(R.id.monday_date); tuDate = (TextView) rootView.findViewById(R.id.tuesday_date); wDate = (TextView) rootView.findViewById(R.id.wednesday_date); thDate = (TextView) rootView.findViewById(R.id.thursday_date); fDate = (TextView) rootView.findViewById(R.id.friday_date); sDate = (TextView) rootView.findViewById(R.id.saturday_date); mDay = (TextView) rootView.findViewById(R.id.monday_letter); tuDay = (TextView) rootView.findViewById(R.id.tuesday_letter); wDay = (TextView) rootView.findViewById(R.id.wednesday_letter); thDay = (TextView) rootView.findViewById(R.id.thursday_letter); fDay = (TextView) rootView.findViewById(R.id.friday_letter); sDay = (TextView) rootView.findViewById(R.id.saturday_letter); mImage = (ImageView) rootView.findViewById(R.id.mImage); tuImage = (ImageView) rootView.findViewById(R.id.tuImage); wImage = (ImageView) rootView.findViewById(R.id.wImage); thImage = (ImageView) rootView.findViewById(R.id.thImage); fImage = (ImageView) rootView.findViewById(R.id.fImage); sImage = (ImageView) rootView.findViewById(R.id.sImage); mBox = (LinearLayout) rootView.findViewById(R.id.monday_box); tuBox = (LinearLayout) rootView.findViewById(R.id.tuesday_box); wBox = (LinearLayout) rootView.findViewById(R.id.wednesday_box); thBox = (LinearLayout) rootView.findViewById(R.id.thursday_box); fBox = (LinearLayout) rootView.findViewById(R.id.friday_box); sBox = (LinearLayout) rootView.findViewById(R.id.saturday_box); calIcon = (LinearLayout) rootView.findViewById(R.id.calender_icon); myTimeTablePager = (ViewPager) rootView.findViewById(R.id.pager); arrayImages = new ArrayList<>(); arrayImages.add(mImage);//from w ww . j av a2 s . com arrayImages.add(tuImage); arrayImages.add(wImage); arrayImages.add(thImage); arrayImages.add(fImage); arrayImages.add(sImage); connectAPI = new ConnectAPI(getActivity()); dataHandler = new DataHandler(getActivity()); dialog = new ProgressDialog(getActivity()); myTheme = new MyTheme(getActivity()); }
From source file:com.lullabot.android.apps.iosched.ui.NewsFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { ViewGroup root = (ViewGroup) inflater.inflate(R.layout.fragment_webview_with_spinner, null); // For some reason, if we omit this, NoSaveStateFrameLayout thinks we are // FILL_PARENT / WRAP_CONTENT, making the progress bar stick to the top of the activity. root.setLayoutParams(/*from ww w . j av a 2s . co m*/ new ViewGroup.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT)); mLoadingSpinner = root.findViewById(R.id.loading_spinner); mWebView = (WebView) root.findViewById(R.id.webview); mWebView.setWebViewClient(mWebViewClient); mWebView.post(new Runnable() { public void run() { mWebView.getSettings().setJavaScriptEnabled(true); mWebView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true); mWebView.loadUrl("http://dev.drupalcampnyc.org/mobile/news"); } }); return root; }
From source file:com.ruesga.android.wallpapers.photophase.preferences.DispositionFragment.java
/** * {@inheritDoc}// w w w. j a v a 2 s . c o m */ @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment ViewGroup v = (ViewGroup) inflater.inflate(R.layout.choose_disposition_fragment, container, false); mCurrentPage = 0; mNumberOfTemplates = getDispositionsTemplates().length; mAdvise = (TextView) v.findViewById(R.id.advise); mResizeFrame = (ResizeFrame) v.findViewById(R.id.resize_frame); mAdapter = new DispositionAdapter(getActivity(), getAllDispositions(), mResizeFrame, this); mPager = (ViewPager) v.findViewById(R.id.dispositions_pager); mPager.setAdapter(mAdapter); mPager.setOnPageChangeListener(this); mPager.setCurrentItem(0); return v; }
From source file:gov.wa.wsdot.android.wsdot.ui.tollrates.I405TollRatesFragment.java
/** * Adds a toll rate accuracy disclaimer to the bottom of the view * @param root//from w w w.j a v a 2 s. c om */ private void addDisclaimerView(ViewGroup root) { FrameLayout frame = root.findViewById(R.id.list_container); TextView textView = new TextView(getContext()); textView.setBackgroundColor(getResources().getColor(R.color.alerts)); textView.setText( "Estimated toll rates provided as a courtesy. Youll always pay the toll you see on actual road signs when you enter."); textView.setPadding(15, 20, 15, 15); FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.WRAP_CONTENT, FrameLayout.LayoutParams.WRAP_CONTENT); params.gravity = Gravity.BOTTOM; textView.setLayoutParams(params); frame.addView(textView); }
From source file:com.hyperaware.conference.android.fragment.HomeFragment.java
private void populateTimeGroups(SortedMap<DateRange, List<AgendaItem>> groups, ViewGroup time_groups) { final LayoutInflater inflater = getActivity().getLayoutInflater(); for (Map.Entry<DateRange, List<AgendaItem>> entry : groups.entrySet()) { final ViewGroup sessions_group = (ViewGroup) inflater.inflate(R.layout.item_time_group_sessions, time_groups, false);/*from ww w.j a v a 2 s . c o m*/ time_groups.addView(sessions_group); final TextView tv_time = (TextView) sessions_group.findViewById(R.id.tv_time); final DateRange range = entry.getKey(); sb.setLength(0); DateUtils.formatDateRange(tv_time.getContext(), formatter, range.start, range.end, DateUtils.FORMAT_SHOW_TIME, event.getTimezoneName()); tv_time.setText(formatter.toString()); final ViewGroup vg_sessions = (ViewGroup) sessions_group.findViewById(R.id.vg_sessions); vg_sessions.removeAllViews(); for (final AgendaItem item : entry.getValue()) { final View session = inflater.inflate(R.layout.item_time_group_session, vg_sessions, false); vg_sessions.addView(session); final TextView tv_topic = (TextView) session.findViewById(R.id.tv_topic); tv_topic.setText(item.getTopic()); } } }
From source file:org.androidtitlan.estoesgoogle.ui.MapFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { ViewGroup root = (ViewGroup) inflater.inflate(R.layout.fragment_webview_with_spinner, null); // For some reason, if we omit this, NoSaveStateFrameLayout thinks we are // FILL_PARENT / WRAP_CONTENT, making the progress bar stick to the top of the activity. root.setLayoutParams(//from ww w . j a v a 2 s . c o m new ViewGroup.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT)); mLoadingSpinner = root.findViewById(R.id.loading_spinner); mWebView = (WebView) root.findViewById(R.id.webview); mWebView.setWebChromeClient(mWebChromeClient); mWebView.setWebViewClient(mWebViewClient); mWebView.post(new Runnable() { public void run() { // Initialize web view if (CLEAR_CACHE_ON_LOAD) { mWebView.clearCache(true); } mWebView.getSettings().setJavaScriptEnabled(true); mWebView.getSettings().setJavaScriptCanOpenWindowsAutomatically(false); mWebView.loadUrl(MAP_URL); } }); return root; }