Example usage for android.view View VISIBLE

List of usage examples for android.view View VISIBLE

Introduction

In this page you can find the example usage for android.view View VISIBLE.

Prototype

int VISIBLE

To view the source code for android.view View VISIBLE.

Click Source Link

Document

This view is visible.

Usage

From source file:at.bitfire.davdroid.mirakel.syncadapter.EnterCredentialsFragment.java

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View v = inflater.inflate(R.layout.enter_credentials, container, false);

    // protocol selection spinner
    textHttpWarning = (TextView) v.findViewById(R.id.http_warning);

    Spinner spnrProtocol = (Spinner) v.findViewById(R.id.select_protocol);
    spnrProtocol.setOnItemSelectedListener(new OnItemSelectedListener() {
        @Override/*ww w. j  av a 2s.c  om*/
        public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
            protocol = parent.getAdapter().getItem(position).toString();
            textHttpWarning.setVisibility(protocol.equals("https://") ? View.GONE : View.VISIBLE);
        }

        @Override
        public void onNothingSelected(AdapterView<?> parent) {
            protocol = null;
        }
    });
    spnrProtocol.setSelection(1); // HTTPS

    // other input fields
    editBaseURL = (EditText) v.findViewById(R.id.baseURL);
    editBaseURL.addTextChangedListener(this);

    editUserName = (EditText) v.findViewById(R.id.userName);
    editUserName.addTextChangedListener(this);

    editPassword = (EditText) v.findViewById(R.id.password);
    editPassword.addTextChangedListener(this);

    checkboxPreemptive = (CheckBox) v.findViewById(R.id.auth_preemptive);

    // hook into action bar
    setHasOptionsMenu(true);

    return v;
}

From source file:de.lebenshilfe_muenster.uk_gebaerden_muensterland.sign_trainer.SignTrainerPassiveFragment.java

@Nullable
@Override//  ww  w.  ja  v  a  2  s  .  co  m
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    Log.d(TAG, "onCreateView " + hashCode());
    final View view = inflater.inflate(R.layout.trainer_passive_fragment, container, false);
    setHasOptionsMenu(true);
    initializeQuestionViews(view);
    initializeAnswerViews(view);
    initializeVideoViews(view);
    this.questionViews = new View[] { this.signQuestionText, this.videoView, this.solveQuestionButton };
    this.answerViews = new View[] { this.signAnswerTextView, this.signMnemonicTextView,
            this.signLearningProgressTextView, this.signHowHardWasQuestionTextView,
            this.signTrainerExplanationTextView, this.questionWasEasyButton, this.questionWasFairButton,
            this.questionWasHardButton };
    setVisibility(this.questionViews, View.VISIBLE);
    setVisibility(this.answerViews, View.GONE);
    return view;
}

From source file:com.manning.androidhacks.hack020.view.impl.SplashActivity.java

public void showProgress() {
    mProgressBar.setVisibility(View.VISIBLE);
}

From source file:com.linkedin.android.eventsapp.ProfileActivity.java

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_profile);

    Bundle extras = getIntent() != null ? getIntent().getExtras() : new Bundle();
    final Person person = extras.getParcelable("person");
    final Activity currentActivity = this;
    final ActionBar bar = getActionBar();
    View viewActionBar = getLayoutInflater().inflate(R.layout.layout_action_bar, null);

    ImageView backView = (ImageView) viewActionBar.findViewById(R.id.actionbar_left);
    backView.setImageResource(R.drawable.arrow_left);
    backView.setVisibility(View.VISIBLE);
    backView.setClickable(true);//w ww  .ja v a  2s.c  o  m
    backView.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            currentActivity.finish();
        }
    });

    ActionBar.LayoutParams params = new ActionBar.LayoutParams(ActionBar.LayoutParams.WRAP_CONTENT,
            ActionBar.LayoutParams.MATCH_PARENT);
    bar.setCustomView(viewActionBar, params);
    bar.setDisplayShowCustomEnabled(true);
    bar.setDisplayShowTitleEnabled(false);
    bar.setIcon(new ColorDrawable(Color.TRANSPARENT));
    bar.setBackgroundDrawable(new ColorDrawable(Color.parseColor("#F15153")));

    TextView attendeeNameView = (TextView) findViewById(R.id.attendeeName);
    attendeeNameView.setText(person.getFirstName() + " " + person.getLastName());

    final ImageView attendeeImageView = (ImageView) findViewById(R.id.attendeeImage);
    final TextView attendeeHeadlineView = (TextView) findViewById(R.id.attendeeHeadline);
    final TextView attendeeLocationView = (TextView) findViewById(R.id.attendeeLocation);

    boolean isAccessTokenValid = LISessionManager.getInstance(currentActivity).getSession().isValid();
    if (isAccessTokenValid) {
        String url = Constants.personByIdBaseUrl + person.getLinkedinId() + Constants.personProjection;
        APIHelper.getInstance(currentActivity).getRequest(currentActivity, url, new ApiListener() {
            @Override
            public void onApiSuccess(ApiResponse apiResponse) {
                try {
                    JSONObject s = apiResponse.getResponseDataAsJson();
                    String headline = s.has("headline") ? s.getString("headline") : "";
                    String pictureUrl = s.has("pictureUrl") ? s.getString("pictureUrl") : null;
                    JSONObject location = s.getJSONObject("location");
                    String locationName = location != null && location.has("name") ? location.getString("name")
                            : "";

                    attendeeHeadlineView.setText(headline);
                    attendeeLocationView.setText(locationName);
                    if (pictureUrl != null) {
                        new FetchImageTask(attendeeImageView).execute(pictureUrl);
                    } else {
                        attendeeImageView.setImageResource(R.drawable.ghost_person);
                    }
                } catch (JSONException e) {

                }

            }

            @Override
            public void onApiError(LIApiError apiError) {

            }
        });

        ViewStub viewOnLIStub = (ViewStub) findViewById(R.id.viewOnLIStub);
        View viewOnLI = viewOnLIStub.inflate();
        Button viewOnLIButton = (Button) viewOnLI.findViewById(R.id.viewOnLinkedInButton);
        viewOnLIButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                DeepLinkHelper.getInstance().openOtherProfile(currentActivity, person.getLinkedinId(),
                        new DeepLinkListener() {
                            @Override
                            public void onDeepLinkSuccess() {

                            }

                            @Override
                            public void onDeepLinkError(LIDeepLinkError error) {

                            }
                        });
            }
        });
    } else {
        attendeeImageView.setImageResource(R.drawable.ghost_person);
    }
}

From source file:com.wms.opensource.shopfast.task.LoadProductsInCollectionTask.java

protected void onPreExecute() {
    progressBar.setVisibility(View.VISIBLE);
}

From source file:de.devmil.common.ui.color.HistorySelectorView.java

private void makeColorList() {
    LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    LinearLayout colorlist = (LinearLayout) findViewById(R.id.colorlist);

    if (colors == null || colors.length() <= 0) {
        View nocolors = findViewById(R.id.nocolors);
        nocolors.setVisibility(View.VISIBLE);
        colorlist.setVisibility(View.GONE);
        findViewById(R.id.colorlistscroll).setVisibility(View.GONE); //have to remove it's parent container too
        return;//from ww  w  .  j  ava2 s  .co  m
    }
    try {
        for (int i = colors.length() - 1; i >= 0; i--) {
            final int color = colors.getInt(i);
            ViewGroup boxgroup = (ViewGroup) inflater.inflate(R.layout.color_historyview_item, colorlist,
                    false);
            TextView box = (TextView) boxgroup.findViewById(R.id.colorbox);
            box.setBackgroundColor(color);
            //box.setText("#"+Integer.toHexString(color));
            colorlist.addView(boxgroup);
            box.setOnClickListener(new OnClickListener() {
                public void onClick(View v) {
                    setColor(color);
                    onColorChanged();
                }
            });
        }
    } catch (Exception e) {
        e.printStackTrace();
    }

}

From source file:com.google.developers.actions.debugger.CayleyActivity.java

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    try {//  ww w .  jav a  2 s  .  c  om
        getActionBar().setDisplayHomeAsUpEnabled(true);
    } catch (NullPointerException e) {
        e.printStackTrace();
    }
    setContentView(R.layout.activity_cayley);
    Intent intent = getIntent();
    intent.setAction(intent.getStringExtra(MainActivity.ACTION));
    intent.setComponent(null);
    mIntent = intent;
    mActionType = intent.getStringExtra(MainActivity.ACTION_TYPE);
    if (mActionType.equals("PLAY_ARTIST")) {
        mEditText = (EditText) findViewById(R.id.artist);
        mEditText.setVisibility(View.VISIBLE);
        mEditText.setText(getString(R.string.dual_core));
    } else {
        mEditText = (EditText) findViewById(R.id.genre);
        mEditText.setVisibility(View.VISIBLE);
        mEditText.setText(getString(R.string.nerdcore));
    }
}

From source file:org.devtcg.five.activity.SourceCheckSettings.java

@Override
public void onCreate(Bundle icicle) {
    super.onCreate(icicle);

    SourceItem source = SourceItem/*from   www  . j av  a2  s . c  o  m*/
            .getInstance(getContentResolver().query(getIntent().getData(), null, null, null, null));
    if (source == null)
        throw new IllegalArgumentException("This activity needs a server source Uri");

    setContentView(R.layout.source_check_settings);

    Button cancel = (Button) findViewById(R.id.cancel);
    cancel.setVisibility(View.VISIBLE);

    findViewById(R.id.next).setVisibility(View.GONE);

    mMessage = (TextView) findViewById(R.id.message);
    mMessage.setText("Verifying Five server settings...");

    mThread = (VerifyThread) getLastNonConfigurationInstance();
    if (mThread != null)
        mThread.setActivity(this);
    else {
        mThread = new VerifyThread(this, source);
        mThread.start();
    }
}

From source file:com.yoavst.quickapps.news.LoginActivity.java

@SuppressLint("SetJavaScriptEnabled")
private WebView createWebView(final Context context) {
    WebView webView = new WebView(context);
    webView.setWebViewClient(createWebViewClient());
    webView.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY);
    webView.setVisibility(View.VISIBLE);
    webView.getSettings().setJavaScriptEnabled(true);
    webView.getSettings().setLoadWithOverviewMode(true);
    webView.getSettings().setSupportZoom(true);
    webView.getSettings().setBuiltInZoomControls(false);
    return webView;
}

From source file:net.olejon.mdapp.LvhActivity.java

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // Connected?
    if (!mTools.isDeviceConnected())
        mTools.showToast(getString(R.string.device_not_connected), 1);

    // Layout/*from w w  w. j  a v a 2  s  .c o  m*/
    setContentView(R.layout.activity_lvh);

    // Toolbar
    final Toolbar toolbar = (Toolbar) findViewById(R.id.lvh_toolbar);
    toolbar.setTitle(getString(R.string.lvh_title));

    setSupportActionBar(toolbar);
    getSupportActionBar().setDisplayHomeAsUpEnabled(true);

    // Progress bar
    mProgressBar = (ProgressBar) findViewById(R.id.lvh_toolbar_progressbar);
    mProgressBar.setVisibility(View.VISIBLE);

    // Refresh
    mSwipeRefreshLayout = (SwipeRefreshLayout) findViewById(R.id.lvh_swipe_refresh_layout);
    mSwipeRefreshLayout.setColorSchemeResources(R.color.accent_blue, R.color.accent_green,
            R.color.accent_purple, R.color.accent_orange);

    mSwipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
        @Override
        public void onRefresh() {
            getCategories(false);
        }
    });

    // Recycler view
    mRecyclerView = (RecyclerView) findViewById(R.id.lvh_cards);

    mRecyclerView.setHasFixedSize(true);
    mRecyclerView.setAdapter(new LvhAdapter(mContext, new JSONArray()));
    mRecyclerView.setLayoutManager(new LinearLayoutManager(mContext));

    // Get categories
    getCategories(true);
}