Back to project page binghamton_svc.
The source code is released under:
MIT License
If you think the Android project binghamton_svc listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package Fragments; //from w w w . j a v a 2 s. c om import java.util.Calendar; import com.github.chrzhang.R; import android.os.Bundle; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.webkit.WebView; import android.webkit.WebViewClient; import android.widget.ImageButton; import android.widget.TextView; /** * Fragment for displaying a WebView with information about events from the * appropriate Google Form. * @author Christopher Zhang */ public class EventsSectionFragment extends Fragment { WebView browser; TextView lastUpdated; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.fragment_section_events, container, false); lastUpdated = (TextView) rootView.findViewById(R.id.tTimeUpdated); browser = (WebView) rootView.findViewById(R.id.wvEventsPage); browser.setWebViewClient(new WebViewClient() { @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { return false; } }); browser.loadUrl("https://docs.google.com/document/d/16JBP-k6SV8llsEa6R0LuLe3vnrvNk4ll8uzArBgEM2w/pub?embedded=true"); lastUpdated.setText("Most Recent Update Attempt: \n" + java.text.DateFormat.getDateTimeInstance().format(Calendar.getInstance().getTime())); ImageButton refresherB = (ImageButton) rootView.findViewById(R.id.ibRefresh); refresherB.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { browser.loadUrl("https://docs.google.com/document/d/16JBP-k6SV8llsEa6R0LuLe3vnrvNk4ll8uzArBgEM2w/pub?embedded=true"); lastUpdated.setText("Most Recent Update Attempt: \n" + java.text.DateFormat.getDateTimeInstance().format(Calendar.getInstance().getTime())); } }); return rootView; } }