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:net.dewep.intranetepitech.ui.landing.LandingActivity.java
private void setConnectionInProgress() { this.setMessageState(Q.getString(R.string.landing_connection_in_progress)); mLandingConnectionError.setVisibility(View.GONE); mLandingConnectionProgressbar.setVisibility(View.VISIBLE); mPager.setCurrentItem(0, true);// ww w . j a v a2 s . c om }
From source file:fm.smart.r1.activity.CreateExampleActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ExceptionHandler.register(this); setContentView(R.layout.create_example); final Intent queryIntent = getIntent(); Bundle extras = queryIntent.getExtras(); item_id = (String) extras.get("item_id"); list_id = (String) extras.get("list_id"); if (list_id == null || list_id.equals("")) { list_id = Main.default_study_list_id; }// www . j a va2s . c o m cue = (String) extras.get("cue"); example = (String) extras.get("example"); translation = (String) extras.get("translation"); example_language = (String) extras.get("example_language"); translation_language = (String) extras.get("translation_language"); example_transliteration = (String) extras.get("example_transliteration"); translation_transliteration = (String) extras.get("translation_transliteration"); TextView example_text = (TextView) findViewById(R.id.create_example_sentence); if (!TextUtils.isEmpty(example)) { example_text.setText(example); } example_text.setHint(example_language + " sentence with " + cue); TextView translation_text = (TextView) findViewById(R.id.create_example_translation); if (!TextUtils.isEmpty(translation)) { translation_text.setText(translation); } translation_text.setHint(translation_language + " translation of example sentence"); Button button = (Button) findViewById(R.id.create_example_submit); button.setOnClickListener(this); TextView translation_text_legend = (TextView) findViewById(R.id.create_example_translation_legend); TextView sentence_transliteration_textView = (TextView) findViewById( R.id.create_example_sentence_transliteration); EditText sentence_transliteration_input_textView = (EditText) findViewById(R.id.sentence_transliteration); if (!Utils.isIdeographicLanguage(Main.search_lang)) { sentence_transliteration_textView.setVisibility(View.GONE); sentence_transliteration_input_textView.setVisibility(View.GONE); } else if (!TextUtils.isEmpty(example_transliteration)) { sentence_transliteration_input_textView.setText(example_transliteration); } TextView translation_transliteration_textView = (TextView) findViewById( R.id.create_example_translation_transliteration); EditText translation_transliteration_input_textView = (EditText) findViewById( R.id.translation_transliteration); if (!Utils.isIdeographicLanguage(Main.result_lang)) { translation_transliteration_textView.setVisibility(View.GONE); translation_transliteration_input_textView.setVisibility(View.GONE); } else if (!TextUtils.isEmpty(translation_transliteration)) { translation_transliteration_input_textView.setText(translation_transliteration); } }
From source file:kr.co.generic.wifianalyzer.wifi.AccessPointDetailTest.java
@Test public void testMakeViewFullWithGroupIndicatorGone() throws Exception { // setup// w w w .ja v a 2s . c o m WiFiAdditional wiFiAdditional = new WiFiAdditional(StringUtils.EMPTY, false); WiFiDetail wiFiDetail = withWiFiDetail(SSID, wiFiAdditional); // execute View actual = fixture.makeView(null, null, wiFiDetail, false); // validate assertEquals(View.GONE, actual.findViewById(kr.co.generic.wifianalyzer.R.id.groupIndicator).getVisibility()); }
From source file:kr.co.generic.wifianalyzer.wifi.AccessPointDetail.java
private void setViewCompact(@NonNull Context context, @NonNull View view, @NonNull WiFiDetail wiFiDetail, boolean isChild) { ((TextView) view.findViewById(kr.co.generic.wifianalyzer.R.id.ssid)).setText(wiFiDetail.getTitle()); WiFiSignal wiFiSignal = wiFiDetail.getWiFiSignal(); Strength strength = wiFiSignal.getStrength(); Security security = wiFiDetail.getSecurity(); ImageView securityImage = (ImageView) view.findViewById(kr.co.generic.wifianalyzer.R.id.securityImage); securityImage.setImageResource(security.imageResource()); securityImage/*w w w . ja v a2 s . c o m*/ .setColorFilter(ContextCompat.getColor(context, kr.co.generic.wifianalyzer.R.color.icons_color)); TextView textLevel = (TextView) view.findViewById(kr.co.generic.wifianalyzer.R.id.level); textLevel.setText(String.format(Locale.ENGLISH, "%ddBm", wiFiSignal.getLevel())); textLevel.setTextColor(ContextCompat.getColor(context, strength.colorResource())); ((TextView) view.findViewById(kr.co.generic.wifianalyzer.R.id.channel)) .setText(wiFiSignal.getChannelDisplay()); ((TextView) view.findViewById(kr.co.generic.wifianalyzer.R.id.primaryFrequency)).setText(String .format(Locale.ENGLISH, "%d%s", wiFiSignal.getPrimaryFrequency(), WiFiSignal.FREQUENCY_UNITS)); ((TextView) view.findViewById(kr.co.generic.wifianalyzer.R.id.distance)) .setText(String.format(Locale.ENGLISH, "%5.1fm", wiFiSignal.getDistance())); if (isChild) { view.findViewById(kr.co.generic.wifianalyzer.R.id.tab).setVisibility(View.VISIBLE); } else { view.findViewById(kr.co.generic.wifianalyzer.R.id.tab).setVisibility(View.GONE); } }
From source file:com.csipsimple.wizards.impl.Zadarma.java
private void updateAccountInfos(final SipProfile acc) { if (acc != null && acc.id != SipProfile.INVALID_ID) { setFirstViewVisibility(false);//from w w w .j av a 2s . c om customWizard.setVisibility(View.GONE); accountBalanceHelper.launchRequest(acc); } else { if (firstView == null) { firstView = new AccountCreationFirstView(parent); ViewGroup globalContainer = (ViewGroup) settingsContainer.getParent(); firstView.setOnAccountCreationFirstViewListener(this); globalContainer.addView(firstView); } setFirstViewVisibility(true); } }
From source file:com.velia_systems.menuphoto.connection.ImageDownloader.java
/** * Same as download but the image is always downloaded and the cache is not used. * Kept private at the moment as its interest is not clear. *///from w w w . ja v a 2s. c o m private void forceDownload(String url, ImageView imageView, Bitmap bitmap, ProgressBar progress) { // State sanity: url is guaranteed to never be null in DownloadedDrawable and cache keys. if (url == null) { imageView.setImageDrawable(null); return; } if (cancelPotentialDownload(url, imageView)) { switch (mode) { case NO_ASYNC_TASK: bitmap = downloadBitmap(url); // Log.d("ImageDownloader", "Sizes: " + bitmap.getWidth() + "x" + bitmap.getHeight()); int width = bitmap.getWidth(); int height = bitmap.getHeight(); int destHeight = 100 * height / width; Bitmap bmp1 = Bitmap.createScaledBitmap(bitmap, 100, destHeight, false); bitmap.recycle(); addBitmapToCache(url, bmp1); imageView.setImageBitmap(bmp1); progress.setVisibility(View.GONE); break; case NO_DOWNLOADED_DRAWABLE: imageView.setMinimumHeight(50); BitmapDownloaderTask task = new BitmapDownloaderTask(imageView, progress); task.execute(url); break; case CORRECT: task = new BitmapDownloaderTask(imageView, progress); DownloadedDrawable downloadedDrawable = new DownloadedDrawable(task); imageView.setImageDrawable(downloadedDrawable); imageView.setMinimumHeight(50); task.execute(url); break; } } }
From source file:com.example.android.wearable.wcldemo.pages.StockActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mHandler = new Handler(); setContentView(R.layout.stock);//from w ww .j a v a2 s. co m setAmbientEnabled(); mWearManager = WearManager.getInstance(); mConsumer = new AbstractWearConsumer() { @Override public void onWearableApiConnected() { updateButton(true); } @Override public void onWearableApiConnectionFailed() { Log.d(TAG, "Connection failed"); updateButton(false); } @Override public void onWearableApiConnectionSuspended() { Log.d(TAG, "Connection suspended"); updateButton(false); } }; setupViews(); updateButton(mWearManager.isConnected()); mSubmit.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { clearValues(); Set<Node> nodes = mWearManager.getNodesForCapability(Constants.CAPABILITY_HTTP_HANDLER); Log.d(TAG, "available http handler nodes: " + nodes); String nodeId = null; Node node = Utils.filterForNearby(nodes); if (node != null) { nodeId = node.getId(); } else { Toast.makeText(StockActivity.this, R.string.no_node_available, Toast.LENGTH_SHORT).show(); return; } mProgressBar.setVisibility(View.VISIBLE); try { new WearHttpHelper.Builder(url, StockActivity.this).setHttpMethod(WearHttpHelper.METHOD_GET) // optional, GET is default .setTargetNodeId(nodeId).setHttpResponseListener(StockActivity.this) // default timeout is 15000 ms = 15 seconds .setTimeout(TimeUnit.SECONDS.toMillis(10)).build().makeHttpRequest(); } catch (IllegalStateException e) { Log.e(TAG, "No Api Client Connection"); mProgressBar.setVisibility(View.GONE); } catch (IllegalArgumentException e) { Log.e(TAG, "Arguments are missing for the http call", e); mProgressBar.setVisibility(View.GONE); } } }); }
From source file:com.meetingninja.csse.user.ProfileFragment.java
private void setupViews(View v) { informationView = v.findViewById(R.id.profile_container); emptyView = v.findViewById(android.R.id.empty); mUserImage = (SmartImageView) v.findViewById(R.id.view_prof_pic); mName = (TextView) v.findViewById(R.id.profile_name); mTitleCompany = (TextView) v.findViewById(R.id.profile_title_company); mTitleCompany.setVisibility(View.GONE); mLocation = (TextView) v.findViewById(R.id.profile_location); mLocation.setVisibility(View.GONE); mEmail = (TextView) v.findViewById(R.id.profile_email); mEmail.setOnClickListener(new ContactListener()); mPhone = (TextView) v.findViewById(R.id.profile_phone); v.findViewById(R.id.profile_phone_row).setVisibility(View.GONE); mPhone.setOnClickListener(new ContactListener()); }
From source file:de.lebenshilfe_muenster.uk_gebaerden_muensterland.sign_trainer.SignTrainerActiveFragment.java
@Override protected void handleClickOnSolveQuestionButton() { setVisibility(this.questionViews, View.GONE); setVisibility(this.answerViews, View.VISIBLE); try {/*from ww w.ja va 2 s . c om*/ setupVideoView(this.currentSign, SOUND.ON, CONTROLS.SHOW); } catch (VideoSetupException ex) { handleVideoCouldNotBeLoaded(ex); } setAnswerTextViews(); }
From source file:edu.stanford.mobisocial.dungbeetle.ui.ViewContactActivity.java
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_feed_home); checked = new boolean[filterTypes.length]; for (int x = 0; x < filterTypes.length; x++) { checked[x] = true;/*from ww w . j a v a 2 s. c om*/ } findViewById(R.id.btn_broadcast).setVisibility(View.GONE); mContactId = getIntent().getLongExtra("contact_id", -1); if (mContactId == -1) { Uri data = getIntent().getData(); if (data != null) { try { mContactId = Long.parseLong(data.getLastPathSegment()); } catch (NumberFormatException e) { } } } Bundle args = new Bundle(); args.putLong("contact_id", mContactId); Fragment profileFragment = new ViewProfileFragment(); profileFragment.setArguments(args); if (mContactId == Contact.MY_ID) { doTitleBar(this, "My Profile"); mLabels.add("View"); mLabels.add("Edit"); mFragments.add(profileFragment); mFragments.add(new EditProfileFragment()); // TODO: Legitimize this. Move objects to a randomly generated private feed // Ability to "move" private feeds. // Have a "feedPtrObj" that tracks your current private. Store in-app feed. Uri privateUri = Uri.parse(DungBeetleContentProvider.CONTENT_URI + "/feeds/private"); mLabels.add("Notes"); Fragment feedView = new FeedViewFragment(); args = new Bundle(args); args.putParcelable(FeedViewFragment.ARG_FEED_URI, privateUri); feedView.setArguments(args); mFragments.add(feedView); } else { String title = "Profile"; Uri feedUri = null; try { Contact contact = Contact.forId(this, mContactId).get(); title = contact.name; feedUri = contact.getFeedUri(); } catch (NoValError e) { } args.putParcelable(FeedViewFragment.ARG_FEED_URI, feedUri); doTitleBar(this, title); mLabels.add("Feed"); mLabels.add("Apps"); mLabels.add("Profile"); Fragment feedView = new FeedViewFragment(); feedView.setArguments(args); Fragment appView = new AppsViewFragment(); appView.setArguments(args); mFragments.add(feedView); mFragments.add(appView); mFragments.add(profileFragment); if (MusubiBaseActivity.getInstance().isDeveloperModeEnabled()) { FeedView sharingView = new PresenceView(); sharingView.getFragment().setArguments(args); mLabels.add(sharingView.getName()); mFragments.add(sharingView.getFragment()); } } PagerAdapter adapter = new ViewFragmentAdapter(getSupportFragmentManager(), mFragments); mViewPager = (ViewPager) findViewById(R.id.feed_pager); mViewPager.setAdapter(adapter); mViewPager.setOnPageChangeListener(this); ViewGroup group = (ViewGroup) findViewById(R.id.tab_frame); int i = 0; for (String s : mLabels) { Button button = new Button(this); button.setText(s); button.setTextSize(18f); button.setLayoutParams(CommonLayouts.FULL_HEIGHT); button.setTag(i++); button.setOnClickListener(mViewSelected); group.addView(button); mButtons.add(button); } // Listen for future changes Uri feedUri; if (mContactId == Contact.MY_ID) { feedUri = Uri.parse(DungBeetleContentProvider.CONTENT_URI + "/feeds/me"); } else { feedUri = Uri.parse(DungBeetleContentProvider.CONTENT_URI + "/contacts"); } mProfileContentObserver = new ProfileContentObserver(mHandler); getContentResolver().registerContentObserver(feedUri, true, mProfileContentObserver); onPageSelected(0); }