Java Code Examples for com.wang.avi.AVLoadingIndicatorView#setVisibility()
The following examples show how to use
com.wang.avi.AVLoadingIndicatorView#setVisibility() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MainActivity.java From OpenCircle with GNU General Public License v3.0 | 6 votes |
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); dbHelper = new DBHelper(MainActivity.this); progressBar = (AVLoadingIndicatorView) findViewById(R.id.progressBar); fullBody = (FrameLayout) findViewById(R.id.full_body); progressBar.setVisibility(View.VISIBLE); fullBody.setVisibility(View.GONE); connectGoogleApiClient(); sms = dbHelper.getSMS(); init(); askForContactPermission(Manifest.permission.SEND_SMS); askForContactPermission(Manifest.permission.READ_PHONE_STATE); askForContactPermission(Manifest.permission.ACCESS_FINE_LOCATION); }
Example 2
Source File: MusicListActivity.java From MusicPlayer_XiangDa with GNU General Public License v3.0 | 5 votes |
@Override public View getView(int i, View view, ViewGroup viewGroup) { View v; //复用 if (view == null) { v = View.inflate(MusicListActivity.this, R.layout.item_musiclist_adapter, null); } else { v = view; } TextView songName = v.findViewById(R.id.item_musicList_songName); TextView songer = v.findViewById(R.id.item_musicList_songer); AVLoadingIndicatorView loadingView = v.findViewById(R.id.item_loadingView); //获取歌曲文件地址 File f = (File) getItem(i); //设置歌曲名字 String name = f.getName(); songName.setText(name.substring(0, name.length() - 4)); //获取当前的播放位置,使得歌曲列表中的loadingView显示出来,表示其正在播放 int currPlayingNum = Utils.getInt(MusicListActivity.this, Constant.PLAYINGNUM, 0); if (currPlayingNum == i) { loadingView.setVisibility(View.VISIBLE); } else { loadingView.setVisibility(View.GONE); } return v; }
Example 3
Source File: PersonDetailActivity.java From PopCorn with Apache License 2.0 | 4 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_person_detail); mToolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(mToolbar); setTitle(""); Intent receivedIntent = getIntent(); mPersonId = receivedIntent.getIntExtra(Constants.PERSON_ID, -1); if (mPersonId == -1) finish(); mCollapsingToolbarLayout = (CollapsingToolbarLayout) findViewById(R.id.toolbar_layout); mAppBarLayout = (AppBarLayout) findViewById(R.id.app_bar); mCastImageCardView = (CardView) findViewById(R.id.card_view_cast_detail); mCastImageSideSize = (int) (getResources().getDisplayMetrics().widthPixels * 0.33); mCastImageCardView.getLayoutParams().height = mCastImageSideSize; mCastImageCardView.getLayoutParams().width = mCastImageSideSize; mCastImageCardView.setRadius(mCastImageSideSize / 2); mCastImageView = (ImageView) findViewById(R.id.image_view_cast_detail); mProgressBar = (AVLoadingIndicatorView) findViewById(R.id.progress_bar_cast_detail); mProgressBar.setVisibility(View.GONE); mCastNameTextView = (TextView) findViewById(R.id.text_view_name_cast_detail); ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) mCastNameTextView.getLayoutParams(); params.setMargins(params.leftMargin, mCastImageSideSize / 2, params.rightMargin, params.bottomMargin); mCastAgeTextView = (TextView) findViewById(R.id.text_view_age_cast_detail); mCastBirthPlaceTextView = (TextView) findViewById(R.id.text_view_birthplace_cast_detail); mBackImageButton = (ImageButton) findViewById(R.id.image_button_back_cast_detail); mBackImageButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { onBackPressed(); } }); mCastBioHeaderTextView = (TextView) findViewById(R.id.text_view_bio_header_person_detail); mCastBioTextView = (TextView) findViewById(R.id.text_view_bio_person_detail); mCastReadMoreBioTextView = (TextView) findViewById(R.id.text_view_read_more_person_detail); mMovieCastTextView = (TextView) findViewById(R.id.text_view_movie_cast_person_detail); mMovieCastRecyclerView = (RecyclerView) findViewById(R.id.recycler_view_movie_cast_person_detail); mMovieCastOfPersons = new ArrayList<>(); mMovieCastsOfPersonAdapter = new MovieCastsOfPersonAdapter(PersonDetailActivity.this, mMovieCastOfPersons); mMovieCastRecyclerView.setAdapter(mMovieCastsOfPersonAdapter); mMovieCastRecyclerView.setLayoutManager(new LinearLayoutManager(PersonDetailActivity.this, LinearLayoutManager.HORIZONTAL, false)); mTVCastTextView = (TextView) findViewById(R.id.text_view_tv_cast_person_detail); mTVCastRecyclerView = (RecyclerView) findViewById(R.id.recycler_view_tv_cast_person_detail); mTVCastOfPersons = new ArrayList<>(); mTVCastsOfPersonAdapter = new TVCastsOfPersonAdapter(PersonDetailActivity.this, mTVCastOfPersons); mTVCastRecyclerView.setAdapter(mTVCastsOfPersonAdapter); mTVCastRecyclerView.setLayoutManager(new LinearLayoutManager(PersonDetailActivity.this, LinearLayoutManager.HORIZONTAL, false)); if (NetworkConnection.isConnected(PersonDetailActivity.this)) { isActivityLoaded = true; loadActivity(); } }
Example 4
Source File: TVShowDetailActivity.java From PopCorn with Apache License 2.0 | 4 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_tvshow_detail); mToolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(mToolbar); setTitle(""); Intent receivedIntent = getIntent(); mTVShowId = receivedIntent.getIntExtra(Constants.TV_SHOW_ID, -1); if (mTVShowId == -1) finish(); mCollapsingToolbarLayout = (CollapsingToolbarLayout) findViewById(R.id.toolbar_layout); mAppBarLayout = (AppBarLayout) findViewById(R.id.app_bar); mPosterWidth = (int) (getResources().getDisplayMetrics().widthPixels * 0.25); mPosterHeight = (int) (mPosterWidth / 0.66); mBackdropWidth = getResources().getDisplayMetrics().widthPixels; mBackdropHeight = (int) (mBackdropWidth / 1.77); mTVShowTabLayout = (ConstraintLayout) findViewById(R.id.layout_toolbar_tv_show); mTVShowTabLayout.getLayoutParams().height = mBackdropHeight + (int) (mPosterHeight * 0.9); mPosterImageView = (ImageView) findViewById(R.id.image_view_poster); mPosterImageView.getLayoutParams().width = mPosterWidth; mPosterImageView.getLayoutParams().height = mPosterHeight; mPosterProgressBar = (AVLoadingIndicatorView) findViewById(R.id.progress_bar_poster); mPosterProgressBar.setVisibility(View.GONE); mBackdropImageView = (ImageView) findViewById(R.id.image_view_backdrop); mBackdropImageView.getLayoutParams().height = mBackdropHeight; mBackdropProgressBar = (AVLoadingIndicatorView) findViewById(R.id.progress_bar_backdrop); mBackdropProgressBar.setVisibility(View.GONE); mTitleTextView = (TextView) findViewById(R.id.text_view_title_tv_show_detail); mGenreTextView = (TextView) findViewById(R.id.text_view_genre_tv_show_detail); mYearTextView = (TextView) findViewById(R.id.text_view_year_tv_show_detail); mBackImageButton = (ImageButton) findViewById(R.id.image_button_back_tv_show_detail); mBackImageButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { onBackPressed(); } }); mFavImageButton = (ImageButton) findViewById(R.id.image_button_fav_tv_show_detail); mShareImageButton = (ImageButton) findViewById(R.id.image_button_share_tv_show_detail); mRatingLayout = (LinearLayout) findViewById(R.id.layout_rating_tv_show_detail); mRatingTextView = (TextView) findViewById(R.id.text_view_rating_tv_show_detail); mOverviewTextView = (TextView) findViewById(R.id.text_view_overview_tv_show_detail); mOverviewReadMoreTextView = (TextView) findViewById(R.id.text_view_read_more_tv_show_detail); mDetailsLayout = (LinearLayout) findViewById(R.id.layout_details_tv_show_detail); mDetailsTextView = (TextView) findViewById(R.id.text_view_details_tv_show_detail); mVideosTextView = (TextView) findViewById(R.id.text_view_trailer_tv_show_detail); mVideosRecyclerView = (RecyclerView) findViewById(R.id.recycler_view_trailers_tv_show_detail); (new LinearSnapHelper()).attachToRecyclerView(mVideosRecyclerView); mVideos = new ArrayList<>(); mVideosAdapter = new VideoAdapter(TVShowDetailActivity.this, mVideos); mVideosRecyclerView.setAdapter(mVideosAdapter); mVideosRecyclerView.setLayoutManager(new LinearLayoutManager(TVShowDetailActivity.this, LinearLayoutManager.HORIZONTAL, false)); mHorizontalLine = (View) findViewById(R.id.view_horizontal_line); mCastTextView = (TextView) findViewById(R.id.text_view_cast_tv_show_detail); mCastRecyclerView = (RecyclerView) findViewById(R.id.recycler_view_cast_tv_show_detail); mCasts = new ArrayList<>(); mCastAdapter = new TVShowCastAdapter(TVShowDetailActivity.this, mCasts); mCastRecyclerView.setAdapter(mCastAdapter); mCastRecyclerView.setLayoutManager(new LinearLayoutManager(TVShowDetailActivity.this, LinearLayoutManager.HORIZONTAL, false)); mSimilarTVShowsTextView = (TextView) findViewById(R.id.text_view_similar_tv_show_detail); mSimilarTVShowsRecyclerView = (RecyclerView) findViewById(R.id.recycler_view_similar_tv_show_detail); mSimilarTVShows = new ArrayList<>(); mSimilarTVShowsAdapter = new TVShowBriefsSmallAdapter(TVShowDetailActivity.this, mSimilarTVShows); mSimilarTVShowsRecyclerView.setAdapter(mSimilarTVShowsAdapter); mSimilarTVShowsRecyclerView.setLayoutManager(new LinearLayoutManager(TVShowDetailActivity.this, LinearLayoutManager.HORIZONTAL, false)); if (NetworkConnection.isConnected(TVShowDetailActivity.this)) { isActivityLoaded = true; loadActivity(); } }
Example 5
Source File: MovieDetailActivity.java From PopCorn with Apache License 2.0 | 4 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_movie_detail); mToolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(mToolbar); setTitle(""); Intent receivedIntent = getIntent(); mMovieId = receivedIntent.getIntExtra(Constants.MOVIE_ID, -1); if (mMovieId == -1) finish(); mCollapsingToolbarLayout = (CollapsingToolbarLayout) findViewById(R.id.toolbar_layout); mAppBarLayout = (AppBarLayout) findViewById(R.id.app_bar); mPosterWidth = (int) (getResources().getDisplayMetrics().widthPixels * 0.25); mPosterHeight = (int) (mPosterWidth / 0.66); mBackdropWidth = getResources().getDisplayMetrics().widthPixels; mBackdropHeight = (int) (mBackdropWidth / 1.77); mMovieTabLayout = (ConstraintLayout) findViewById(R.id.layout_toolbar_movie); mMovieTabLayout.getLayoutParams().height = mBackdropHeight + (int) (mPosterHeight * 0.9); mPosterImageView = (ImageView) findViewById(R.id.image_view_poster); mPosterImageView.getLayoutParams().width = mPosterWidth; mPosterImageView.getLayoutParams().height = mPosterHeight; mPosterProgressBar = (AVLoadingIndicatorView) findViewById(R.id.progress_bar_poster); mPosterProgressBar.setVisibility(View.GONE); mBackdropImageView = (ImageView) findViewById(R.id.image_view_backdrop); mBackdropImageView.getLayoutParams().height = mBackdropHeight; mBackdropProgressBar = (AVLoadingIndicatorView) findViewById(R.id.progress_bar_backdrop); mBackdropProgressBar.setVisibility(View.GONE); mTitleTextView = (TextView) findViewById(R.id.text_view_title_movie_detail); mGenreTextView = (TextView) findViewById(R.id.text_view_genre_movie_detail); mYearTextView = (TextView) findViewById(R.id.text_view_year_movie_detail); mBackImageButton = (ImageButton) findViewById(R.id.image_button_back_movie_detail); mBackImageButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { onBackPressed(); } }); mFavImageButton = (ImageButton) findViewById(R.id.image_button_fav_movie_detail); mShareImageButton = (ImageButton) findViewById(R.id.image_button_share_movie_detail); mRatingLayout = (LinearLayout) findViewById(R.id.layout_rating_movie_detail); mRatingTextView = (TextView) findViewById(R.id.text_view_rating_movie_detail); mOverviewTextView = (TextView) findViewById(R.id.text_view_overview_movie_detail); mOverviewReadMoreTextView = (TextView) findViewById(R.id.text_view_read_more_movie_detail); mDetailsLayout = (LinearLayout) findViewById(R.id.layout_details_movie_detail); mDetailsTextView = (TextView) findViewById(R.id.text_view_details_movie_detail); mTrailerTextView = (TextView) findViewById(R.id.text_view_trailer_movie_detail); mTrailerRecyclerView = (RecyclerView) findViewById(R.id.recycler_view_trailers_movie_detail); (new LinearSnapHelper()).attachToRecyclerView(mTrailerRecyclerView); mTrailers = new ArrayList<>(); mTrailerAdapter = new VideoAdapter(MovieDetailActivity.this, mTrailers); mTrailerRecyclerView.setAdapter(mTrailerAdapter); mTrailerRecyclerView.setLayoutManager(new LinearLayoutManager(MovieDetailActivity.this, LinearLayoutManager.HORIZONTAL, false)); mHorizontalLine = (View) findViewById(R.id.view_horizontal_line); mCastTextView = (TextView) findViewById(R.id.text_view_cast_movie_detail); mCastRecyclerView = (RecyclerView) findViewById(R.id.recycler_view_cast_movie_detail); mCasts = new ArrayList<>(); mCastAdapter = new MovieCastsAdapter(MovieDetailActivity.this, mCasts); mCastRecyclerView.setAdapter(mCastAdapter); mCastRecyclerView.setLayoutManager(new LinearLayoutManager(MovieDetailActivity.this, LinearLayoutManager.HORIZONTAL, false)); mSimilarMoviesTextView = (TextView) findViewById(R.id.text_view_similar_movie_detail); mSimilarMoviesRecyclerView = (RecyclerView) findViewById(R.id.recycler_view_similar_movie_detail); mSimilarMovies = new ArrayList<>(); mSimilarMoviesAdapter = new MovieBriefsSmallAdapter(MovieDetailActivity.this, mSimilarMovies); mSimilarMoviesRecyclerView.setAdapter(mSimilarMoviesAdapter); mSimilarMoviesRecyclerView.setLayoutManager(new LinearLayoutManager(MovieDetailActivity.this, LinearLayoutManager.HORIZONTAL, false)); if (NetworkConnection.isConnected(MovieDetailActivity.this)) { isActivityLoaded = true; loadActivity(); } }