List of usage examples for android.view View VISIBLE
int VISIBLE
To view the source code for android.view View VISIBLE.
Click Source Link
From source file:com.mytalentfolio.h_daforum.CforumDetailOldBatches.java
/** * Show progress./*w w w . ja v a2 s . com*/ * * @param show the show */ public void showProgress(boolean show) { if (show) { commentDisplay.setVisibility(View.GONE); commentProgressDisplay.setVisibility(View.VISIBLE); } else { commentDisplay.setVisibility(View.VISIBLE); commentProgressDisplay.setVisibility(View.GONE); } }
From source file:net.olejon.mdapp.Icd10SearchActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Intent//ww w . ja v a 2s . c o m final Intent intent = getIntent(); mSearchString = intent.getStringExtra("search"); // Layout setContentView(R.layout.activity_icd10_search); // Toolbar final Toolbar toolbar = (Toolbar) findViewById(R.id.icd10_search_toolbar); toolbar.setTitle(getString(R.string.icd10_search_search) + ": \"" + mSearchString + "\""); setSupportActionBar(toolbar); getSupportActionBar().setDisplayHomeAsUpEnabled(true); // Progress bar mProgressBar = (ProgressBar) findViewById(R.id.icd10_search_toolbar_progressbar); mProgressBar.setVisibility(View.VISIBLE); // List mListView = (ListView) findViewById(R.id.icd10_search_list); mListViewEmpty = findViewById(R.id.icd10_search_list_empty); // Get search GetSearchTask getSearchTask = new GetSearchTask(); getSearchTask.execute(); }
From source file:net.olejon.mdapp.NotificationsFromSlvActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Settings//from ww w. j a v a 2 s. c o m PreferenceManager.setDefaultValues(mContext, R.xml.settings, false); // Connected? if (!mTools.isDeviceConnected()) { mTools.showToast(getString(R.string.device_not_connected), 1); finish(); return; } // Notification manager mNotificationManagerCompat = NotificationManagerCompat.from(mContext); // Layout setContentView(R.layout.activity_notifications_from_slv); // Toolbar final Toolbar toolbar = (Toolbar) findViewById(R.id.notifications_from_slv_toolbar); toolbar.setTitle(getString(R.string.notifications_from_slv_title)); setSupportActionBar(toolbar); getSupportActionBar().setDisplayHomeAsUpEnabled(true); // Progress bar mProgressBar = (ProgressBar) findViewById(R.id.notifications_from_slv_toolbar_progressbar); mProgressBar.setVisibility(View.VISIBLE); // Refresh mSwipeRefreshLayout = (SwipeRefreshLayout) findViewById(R.id.notifications_from_slv_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() { getNotifications(false); } }); // Recycler view mRecyclerView = (RecyclerView) findViewById(R.id.notifications_from_slv_cards); mRecyclerView.setHasFixedSize(true); mRecyclerView.setAdapter(new NotificationsFromSlvAdapter(mContext, new JSONArray())); mRecyclerView.setLayoutManager(new LinearLayoutManager(mContext)); // Get notifications getNotifications(true); }
From source file:kkook.team.projectswitch.gcm.TestActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_test_gcm); mRegistrationProgressBar = (ProgressBar) findViewById(R.id.registrationProgressBar); mRegistrationBroadcastReceiver = new BroadcastReceiver() { @Override//www. ja v a 2 s . com public void onReceive(Context context, Intent intent) { mRegistrationProgressBar.setVisibility(ProgressBar.GONE); SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context); boolean sentToken = sharedPreferences.getBoolean(QuickstartPreferences.SENT_TOKEN_TO_SERVER, false); if (sentToken) { mInformationTextView.setText( "Token retrieved and sent to server! You can now use gcmsender to send downstream messages to this app."); ((Button) findViewById(R.id.btnSend)).setVisibility(View.VISIBLE); ((EditText) findViewById(R.id.etMessage)).setVisibility(View.VISIBLE); } else { mInformationTextView.setText( "An error occurred while either fetching the InstanceID token, sending the fetched token to the server or subscribing to the PubSub topic. Please try running the sample again."); } } }; mInformationTextView = (TextView) findViewById(R.id.informationTextView); if (checkPlayServices()) { // Start IntentService to register this application with GCM. Intent intent = new Intent(this, RegistrationIntentService.class); startService(intent); ((Button) findViewById(R.id.btnSend)).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { new Thread(runSender).start(); } }); } }
From source file:org.peterbaldwin.client.android.tinyurl.SendTinyUrlActivity.java
void handleUrl(String url) { mTinyUrl = url;// w w w . j av a 2 s. c o m setTitle(R.string.title_created); mProgressUrl.setVisibility(View.GONE); mTextUrl.setText(url); mTextUrl.setVisibility(View.VISIBLE); mButtonSend.setEnabled(true); mButtonCopy.setEnabled(true); }
From source file:com.liferay.tasks.activity.AddTaskActivity.java
protected void initialize(Bundle extras) { if (extras == null) { return;// w w w. j a v a 2 s.c o m } _update = extras.getBoolean(EXTRA_UPDATE, false); _task = (TaskModel) extras.getSerializable(EXTRA_TASK); if (!_update) { return; } View container = findViewById(R.id.status_bar_container); container.setVisibility(View.VISIBLE); int progress = _task.getStatus() - 1; TextView percentageView = (TextView) findViewById(R.id.percentage); percentageView.setText(String.valueOf(progress * 20) + "%"); OnStatusChangedListener listener = new OnStatusChangedListener(percentageView); _titleView.setText(_task.getTitle()); _seekBar.setProgress(progress); _seekBar.setOnSeekBarChangeListener(listener); }
From source file:com.orange.ocara.ui.activity.EditCommentActivity.java
void setSubtitle(String subTitle) { if (!TextUtils.isEmpty(subTitle)) { customSubtitle.setVisibility(View.VISIBLE); customSubtitle.setText(subTitle); } }
From source file:com.vrem.wifianalyzer.wifi.channelgraph.ChannelGraphNavigation.java
void update(@NonNull WiFiData wiFiData) { Collection<Pair<WiFiChannel, WiFiChannel>> visible = CollectionUtils.select(ids.keySet(), new PairPredicate()); updateButtons(wiFiData, visible);// w w w.j av a 2 s. c o m view.setVisibility(visible.size() > 1 ? View.VISIBLE : View.GONE); }
From source file:com.wolkabout.hexiwear.activity.SignUpActivity.java
@Click(R.id.signUpButton) void signUp() {/*from w w w . ja v a2 s. co m*/ if (!validate()) { return; } if (!termsAndConditions.isChecked()) { Toast.makeText(this, R.string.registration_accept_terms, Toast.LENGTH_LONG).show(); return; } signUpButton.setEnabled(false); signingUp.setVisibility(View.VISIBLE); startSignUp(); }
From source file:net.networksaremadeofstring.rhybudd.DiagnosticActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_diagnostics); try {//w w w . j av a 2 s .c o m getActionBar().setTitle("Diagnostics App"); getActionBar().setSubtitle("Helps to pin point any problems getting events"); getActionBar().setDisplayHomeAsUpEnabled(true); getActionBar().setHomeButtonEnabled(true); } catch (Exception e) { } DiagnosticOutput = (TextView) findViewById(R.id.DiagOutput); progressBar = (ProgressBar) findViewById(R.id.progressBar); ((Button) findViewById(R.id.StartDiagButton)).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { findViewById(R.id.progressBar2).setVisibility(View.VISIBLE); DiagnosticOutput.setText(""); DoDiagnostics(); view.setEnabled(false); } }); progressHandler = new Handler() { public void handleMessage(Message msg) { try { DiagnosticOutput.setText(DiagnosticOutput.getText().toString() + msg.getData().getString(DIAGNOSTIC_OUTPUT) + "\n"); } catch (Exception e) { DiagnosticOutput.setText(DiagnosticOutput.getText().toString() + "A diagnostic message was received but there was an issue displaying it\n"); } if (msg.what == DIAGNOSTIC_PRE) { try { if (progressBar.getSecondaryProgress() < 20) progressBar.setSecondaryProgress((progressBar.getSecondaryProgress() + 1)); } catch (Exception e) { } } else if (msg.what == DIAGNOSTIC_SUCCESS) { try { if (progressBar.getProgress() < 20) progressBar.setProgress((progressBar.getProgress() + 1)); } catch (Exception e) { } } else if (msg.what == DIAGNOSTIC_FAILURE) { try { DiagnosticOutput.setTextColor(getResources().getColor(R.color.WarningRed)); findViewById(R.id.progressBar2).setVisibility(View.INVISIBLE); findViewById(R.id.StartDiagButton).setEnabled(true); } catch (Exception e) { e.printStackTrace(); } } else if (msg.what == DIAGNOSTIC_COMPLETE) { try { DiagnosticOutput.setTextColor(Color.rgb(50, 102, 50)); progressBar.setProgress(20); findViewById(R.id.progressBar2).setVisibility(View.INVISIBLE); } catch (Exception e) { e.printStackTrace(); } try { Toast.makeText(DiagnosticActivity.this, "Diagnostics Complete!", Toast.LENGTH_SHORT).show(); findViewById(R.id.StartDiagButton).setEnabled(true); } catch (Exception e) { e.printStackTrace(); } } else { //Not much else } try { progressBar.invalidate(); } catch (Exception e) { } } }; }