Sunday, September 4, 2011

[android-developers] hide all your widgets?

Is there an easy way to hide all your widgets? Right now, I just have
a mess like this:

void hideEverything() {
View[] views = { wv, hscrollViewEightSports, bb, photosButton,
newsButton, scoresButton, schedulesButton, realtimeButton,
finalScoresButton, statsButton, schoolsButton, abslay, bigLogo,
hsView, loadingView, pb, boxScoresButton, playByPlayButton,
eightSports, topStoriesLabel, readLatestNewsButton,
shareButton, readLatestNewsTop, headlineImage1, headlineImage2,
headlineImage3, lineSeparator1, lineSeparator2, lineSeparator3,
lineSeparator4, selectedNewsTick, selectedScoresTick,
selectedStatsTick, selectedSchoolsTick, selectedPhotosTick,
navBar, smallTabNews, smallTabPhotos,viewPhotosTop,findScoresTop,
smallTabScores};

for (int ctr = 0; ctr < views.length; ctr++)
views[ctr].setVisibility(View.INVISIBLE);
}

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment