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 ww .j av a2 s . co m*/ 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 signup from the * appropriate Google Form. * @author Christopher Zhang */ public class SignupSectionFragment extends Fragment { WebView browser; TextView lastUpdated; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.fragment_section_signup, container, false); lastUpdated = (TextView) rootView.findViewById(R.id.tTimeUpdatedSU); browser = (WebView) rootView.findViewById(R.id.wvSignUpPage); browser.setWebViewClient(new WebViewClient() { @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { return false; } }); browser.loadUrl("https://docs.google.com/forms/d/1EsibiV7vIqVbsTvYFUjuE17LYWxMVMwxb1LmPa16N8o/viewform?embedded=true#start=embed"); lastUpdated.setText("Most Recent Update Attempt: \n" + java.text.DateFormat.getDateTimeInstance().format(Calendar.getInstance().getTime())); ImageButton refresherB = (ImageButton) rootView.findViewById(R.id.ibRefreshSU); refresherB.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { browser.loadUrl("https://docs.google.com/forms/d/1EsibiV7vIqVbsTvYFUjuE17LYWxMVMwxb1LmPa16N8o/viewform?embedded=true#start=embed"); lastUpdated.setText("Most Recent Update Attempt: \n" + java.text.DateFormat.getDateTimeInstance().format(Calendar.getInstance().getTime())); } }); return rootView; } }