List of usage examples for android.view View GONE
int GONE
To view the source code for android.view View GONE.
Click Source Link
From source file:org.devtcg.five.activity.SourceCheckSettings.java
@Override public void onCreate(Bundle icicle) { super.onCreate(icicle); SourceItem source = SourceItem//from w w w .j a va 2 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:de.geeksfactory.opacclient.frontend.InfoFragment.java
public void load() { wvInfo = (WebView) view.findViewById(R.id.wvInfo); TextView tvErr = (TextView) view.findViewById(R.id.tvErr); wvInfo.loadData(getString(R.string.loading), "text/html", null); try {//from w w w. jav a2 s .co m String infoUrl = app.getLibrary().getInformation(); if (infoUrl == null || infoUrl.equals("null")) { wvInfo.setVisibility(View.GONE); tvErr.setVisibility(View.VISIBLE); tvErr.setText(R.string.info_unsupported); } else if (infoUrl.startsWith("http")) { wvInfo.loadUrl(infoUrl); } else { wvInfo.loadUrl(app.getLibrary().getData().getString("baseurl") + infoUrl); } } catch (JSONException e) { e.printStackTrace(); wvInfo.setVisibility(View.GONE); tvErr.setVisibility(View.VISIBLE); tvErr.setText(R.string.info_error); } }
From source file:com.kanchi.periyava.Fragments.Dashboard.java
private void init() { if (UserProfile.getUserProfile().isLoggedIn == false) { return;//from w ww . ja v a2 s.c o m } rootView.findViewById(R.id.japaminfo) .setVisibility(UserProfile.getUserProfile().isLoggedIn == true ? View.VISIBLE : View.GONE); ((TextView) rootView.findViewById(R.id.japam_count_over_all)) .setText("" + UserProfile.getUserProfile().japam_count_over_all); ((TextView) rootView.findViewById(R.id.japam_count_satsang)) .setText(UserProfile.getInstance().isjoinedsatsang == false ? "Not Joined to Satsang" : "" + UserProfile.getUserProfile().japam_count_satsang); ((TextView) rootView.findViewById(R.id.japam_count)).setText("" + UserProfile.getUserProfile().japam_count); final String NEW_FORMAT = "dd-MMM-yyyy"; final String OLD_FORMAT = "yyyy-MM-dd HH:mm:ss"; // August 12, 2010 String oldDateString = UserProfile.getUserProfile().japam_last_updated_date; String newDateString = ""; SimpleDateFormat sdf = new SimpleDateFormat(OLD_FORMAT); Date d = null; try { d = sdf.parse(oldDateString); sdf.applyPattern(NEW_FORMAT); newDateString = sdf.format(d); } catch (ParseException e) { e.printStackTrace(); } ((TextView) rootView.findViewById(R.id.japam_last_updated_date)).setText(newDateString); }
From source file:com.musevisions.android.SudokuSolver.SudokuLoaderActivity.java
private void updateResults() { if (HttpPostUtils.isConnected(this)) { mTextView.setVisibility(View.GONE); mRetriever = new SudokuRetriever(); (new SudokuRetrieverTask(mRetriever, this)).execute(); } else {/*from ww w . j a v a 2s.c o m*/ mTextView.setVisibility(View.VISIBLE); mTextView.setText("Check Internet Connection"); } }
From source file:com.oakesville.mythling.MainActivity.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (getAppSettings().isFirstRun()) { new AlertDialog.Builder(this).setIcon(android.R.drawable.ic_dialog_alert) .setTitle(getString(R.string.setup_required)) .setMessage(getString(R.string.access_network_settings)) .setPositiveButton(getString(R.string.go_to_settings), new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { startActivity(new Intent(MainActivity.this, PrefsActivity.class)); }//w ww. j av a 2 s.c o m }).show(); } setContentView(getAppSettings().isTv() ? R.layout.firetv_split : R.layout.split); findViewById(R.id.breadcrumbs).setVisibility(View.GONE); createProgressBar(); backTo = getIntent().getStringExtra("back_to"); setPathFromIntent(); setSelItemIndex(getIntent().getIntExtra(SEL_ITEM_INDEX, 0)); setTopOffset(getIntent().getIntExtra(TOP_OFFSET, 0)); setCurrentTop(getIntent().getIntExtra(CURRENT_TOP, 0)); String mode = getIntent().getStringExtra(MODE_SWITCH); modeSwitch = mode != null; if (mode == null) mode = getAppSettings().getMediaSettings().getViewType().toString(); if (ViewType.list.toString().equals(mode)) goListView(); else if (ViewType.split.toString().equals(mode)) goSplitView(); if (getAppSettings().getMediaSettings().getViewType() == ViewType.detail) { Intent intent = new Intent(this, MediaPagerActivity.class); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK); if (backTo != null) intent.putExtra("back_to", backTo); startActivity(intent); finish(); return; } listView = (ListView) findViewById(R.id.split_cats); }
From source file:at.mg.androidfeatures.activities.GoogleServiceTest.java
@Override protected void onResume() { super.onResume(); if (checkPlayServices() && checkUserAccount()) { new AuthTask().execute(AccountUtils.getAccountName(this)); } else {/*from w w w . java2s .c om*/ View button = findViewById(R.id.button1); button.setVisibility(View.GONE); } }
From source file:com.aqnote.app.wifianalyzer.wifi.AccessPointsDetailTest.java
@Test public void testSetViewWithIpAddressAndLinkSpeedGone() throws Exception { // setup// w w w. j a v a2 s . com WiFiAdditional wiFiAdditional = new WiFiAdditional(StringUtils.EMPTY, "IPAddress", 22); WiFiDetail wiFiDetail = withWiFiDetail("SSID", wiFiAdditional); // execute fixture.setView(mainActivity.getResources(), view, wiFiDetail, false); // validate assertEquals(View.GONE, view.findViewById(R.id.ipAddress).getVisibility()); assertEquals(View.GONE, view.findViewById(R.id.linkSpeed).getVisibility()); }
From source file:com.mtomczak.nausicaa.AlertView.java
/** * Sets visibility of alert text. Must be called from UI thread. * @param visible If true, alert will show and suppress other views. *///from w w w . j av a 2s. com private void setAlertVisible(boolean visible) { alertText.setVisibility(visible ? View.VISIBLE : View.GONE); childViews.setVisibility(visible ? View.GONE : View.VISIBLE); }
From source file:net.henriquerocha.android.codebits.UserActivity.java
private void setUpActivity() { token = getIntent().getStringExtra(Constants.AUTH_TOKEN); mTvName = (TextView) findViewById(R.id.name); mTvKarmaPoints = (TextView) findViewById(R.id.karma_points); mTvBio = (TextView) findViewById(R.id.bio); mLayout = (RelativeLayout) findViewById(R.id.layout); mLayout.setVisibility(View.GONE); // hide while we don't have data mIvAvatar = (ImageView) findViewById(R.id.avatar); }
From source file:com.vrem.wifianalyzer.wifi.timegraph.TimeGraphView.java
@Override public void update(@NonNull WiFiData wiFiData) { Settings settings = MainContext.INSTANCE.getSettings(); Predicate<WiFiDetail> predicate = FilterPredicate.makeOtherPredicate(settings); List<WiFiDetail> wiFiDetails = wiFiData.getWiFiDetails(predicate, settings.getSortBy()); Set<WiFiDetail> newSeries = dataManager.addSeriesData(graphViewWrapper, wiFiDetails, settings.getGraphMaximumY()); graphViewWrapper.removeSeries(newSeries); graphViewWrapper.updateLegend(settings.getTimeGraphLegend()); graphViewWrapper.setVisibility(isSelected() ? View.VISIBLE : View.GONE); }