Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.widget.ViewSwitcher;

public class Main {
    /**
     * Build UI From Network Issue for PreExecute.
     * @param viewSwitcher
     * @param displayChildIndex
     */
    public static void buildUiFromNetworkIssueForPreExecute(final ViewSwitcher viewSwitcher,
            int displayChildIndex) {
        if (viewSwitcher == null) {
            return;
        }
        //      TextView tvMessage = (TextView) viewSwitcher.findViewById(R.id.tvUiFromNetworkIssueMessage);
        //      ProgressBar pbProgress = (ProgressBar) viewSwitcher.findViewById(R.id.pbUiFromNetworkIssueProgress);
        //      if(pbProgress != null) {
        //         pbProgress.setVisibility(View.VISIBLE);
        //      }
        //      if(tvMessage != null) {
        //         tvMessage.setVisibility(View.GONE);
        //      }
        viewSwitcher.setDisplayedChild(displayChildIndex);
    }
}