|
18 | 18 | import android.webkit.WebView;
|
19 | 19 | import android.webkit.WebViewClient;
|
20 | 20 | import android.widget.EditText;
|
| 21 | +import android.widget.LinearLayout; |
21 | 22 | import android.widget.ProgressBar;
|
22 | 23 | import android.widget.TextView;
|
23 | 24 | import android.widget.Toast;
|
|
34 | 35 |
|
35 | 36 | public class RouterSetupActivity extends AppCompatActivity {
|
36 | 37 | private Toolbar toolbar;
|
| 38 | + private LinearLayout textview_nonetworkconn_container; |
37 | 39 | private TextView textview_nonetworkconn;
|
| 40 | + private LinearLayout webview_container; |
38 | 41 | private WebView webview_main;
|
39 | 42 | private ProgressBar progressBarLoading;
|
40 | 43 | private SwipeRefreshLayout swipeRefresh;
|
@@ -64,7 +67,9 @@ protected void onCreate(Bundle savedInstanceState)
|
64 | 67 | setContentView(R.layout.router_setup_activity);
|
65 | 68 |
|
66 | 69 | toolbar = (Toolbar) findViewById(R.id.toolbar);
|
| 70 | + textview_nonetworkconn_container = (LinearLayout) findViewById(R.id.textview_nonetworkconn_container); |
67 | 71 | textview_nonetworkconn = (TextView) findViewById(R.id.textview_nonetworkconn);
|
| 72 | + webview_container = (LinearLayout) findViewById(R.id.webview_container); |
68 | 73 | webview_main = (WebView) findViewById(R.id.webview_main);
|
69 | 74 | progressBarLoading = (ProgressBar) findViewById(R.id.progressBarLoading);
|
70 | 75 | swipeRefresh = (SwipeRefreshLayout) findViewById(R.id.swipe_refresh);
|
@@ -275,15 +280,19 @@ public void checkNetworkConnectivity() {
|
275 | 280 | }
|
276 | 281 |
|
277 | 282 | public void showWidgets() {
|
| 283 | + webview_container.setVisibility(View.VISIBLE); |
278 | 284 | webview_main.setVisibility(View.VISIBLE);
|
279 | 285 | swipeRefresh.setVisibility(View.VISIBLE);
|
| 286 | + textview_nonetworkconn_container.setVisibility(View.GONE); |
280 | 287 | textview_nonetworkconn.setVisibility(View.GONE);
|
281 | 288 | }
|
282 | 289 |
|
283 | 290 | public void hideWidgets() {
|
| 291 | + webview_container.setVisibility(View.GONE); |
284 | 292 | webview_main.setVisibility(View.GONE);
|
285 | 293 | progressBarLoading.setVisibility(View.GONE);
|
286 | 294 | swipeRefresh.setVisibility(View.GONE);
|
| 295 | + textview_nonetworkconn_container.setVisibility(View.VISIBLE); |
287 | 296 | textview_nonetworkconn.setVisibility(View.VISIBLE);
|
288 | 297 | }
|
289 | 298 |
|
|
0 commit comments