android.widget.ScrollView.setVisibility()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(5.9k)|赞(0)|评价(0)|浏览(133)

本文整理了Java中android.widget.ScrollView.setVisibility()方法的一些代码示例,展示了ScrollView.setVisibility()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ScrollView.setVisibility()方法的具体详情如下:
包路径:android.widget.ScrollView
类名称:ScrollView
方法名:setVisibility

ScrollView.setVisibility介绍

暂无

代码示例

代码示例来源:origin: TeamNewPipe/NewPipe

private void setRelatedStreamsVisibility(int visibility) {
    final ViewParent parent = relatedStreamRootLayout.getParent();
    if (parent instanceof ScrollView) {
      ((ScrollView) parent).setVisibility(visibility);
    } else {
      relatedStreamRootLayout.setVisibility(visibility);
    }
  }
}

代码示例来源:origin: guolindev/booksource

carWashText.setText(carWash);
sportText.setText(sport);
weatherLayout.setVisibility(View.VISIBLE);
Intent intent = new Intent(this, AutoUpdateService.class);
startService(intent);

代码示例来源:origin: guolindev/booksource

weatherLayout.setVisibility(View.INVISIBLE);
requestWeather(mWeatherId);

代码示例来源:origin: fossasia/pslab-android

@Override
  public void onClick(View view) {
    webView.loadUrl("https://pslab.io");
    svHomeContent.setVisibility(View.GONE);
    webView.setWebViewClient(new WebViewClient() {
      @Override
      public void onPageStarted(WebView view, String url, Bitmap favicon) {
        wvProgressBar.setIndeterminate(true);
        wvProgressBar.setVisibility(View.VISIBLE);
      }
      public void onPageFinished(WebView view, String url) {
        wvProgressBar.setVisibility(View.GONE);
        webView.setVisibility(View.VISIBLE);
      }
    });
    isWebViewShowing = true;
  }
});

代码示例来源:origin: fossasia/pslab-android

public void hideWebView() {
  webView.setVisibility(View.GONE);
  svHomeContent.setVisibility(View.VISIBLE);
  isWebViewShowing = false;
}

代码示例来源:origin: googlesamples/android-PictureInPicture

/**
 * Adjusts immersive full-screen flags depending on the screen orientation.
 *
 * @param config The current {@link Configuration}.
 */
private void adjustFullScreen(Configuration config) {
  final View decorView = getWindow().getDecorView();
  if (config.orientation == Configuration.ORIENTATION_LANDSCAPE) {
    decorView.setSystemUiVisibility(
        View.SYSTEM_UI_FLAG_LAYOUT_STABLE
            | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
            | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
            | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
            | View.SYSTEM_UI_FLAG_FULLSCREEN
            | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
    mScrollView.setVisibility(View.GONE);
    mMovieView.setAdjustViewBounds(false);
  } else {
    decorView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
    mScrollView.setVisibility(View.VISIBLE);
    mMovieView.setAdjustViewBounds(true);
  }
}

代码示例来源:origin: googlesamples/android-PictureInPicture

/**
 * Adjusts immersive full-screen flags depending on the screen orientation.
 *
 * @param config The current {@link Configuration}.
 */
private void adjustFullScreen(Configuration config) {
  final View decorView = getWindow().getDecorView();
  if (config.orientation == Configuration.ORIENTATION_LANDSCAPE) {
    decorView.setSystemUiVisibility(
        View.SYSTEM_UI_FLAG_LAYOUT_STABLE
            | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
            | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
            | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
            | View.SYSTEM_UI_FLAG_FULLSCREEN
            | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
    mScrollView.setVisibility(View.GONE);
    mMovieView.setAdjustViewBounds(false);
  } else {
    decorView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
    mScrollView.setVisibility(View.VISIBLE);
    mMovieView.setAdjustViewBounds(true);
  }
}

代码示例来源:origin: 1993hzw/Androids

public void onAnimationEnd(
      Animator animation) {
    mScrollView.setVisibility(View.VISIBLE);
  }
}, "translationY", mPortraitShield.getHeight(),

代码示例来源:origin: quaap/LaunchTime

@Override
  public void onAnimationEnd(Animator animation) {
    mShortcutActionsPopup.setVisibility(View.GONE);
  }
});

代码示例来源:origin: PuffOpenSource/Puff-Android

@Override
  public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
    if (isChecked) {
      words.setVisibility(View.VISIBLE);
    } else {
      words.setVisibility(View.GONE);
    }
  }
});

代码示例来源:origin: 6ag/BaoKanAndroid

@Override
  public void run() {
    mScrollView.setVisibility(View.VISIBLE);
  }
}, 100);

代码示例来源:origin: luboganev/Carbrands

@Override
public void hideProgress() {
  progressBar.setVisibility(View.INVISIBLE);
  contentScrollView.setVisibility(View.VISIBLE);
}

代码示例来源:origin: easefun/polyv-android-sdk-2.0-demo

private void resetViewStatus() {
  answerBottomLayout.setVisibility(VISIBLE);
  answerKonw.setVisibility(GONE);
  answerResponseScroll.setVisibility(GONE);
  answerIllustration.setVisibility(VISIBLE);
  answerList.setVisibility(VISIBLE);
  answerContentLayout.setVisibility(VISIBLE);
  answerTipLayout.setVisibility(GONE);
}

代码示例来源:origin: envyfan/AndroidReview

private void resetLayout() {
  mMainLayout.setVisibility(View.GONE);
  mFAB.setVisibility(View.GONE);
  mTestEmpty.setVisibility(View.VISIBLE);
}

代码示例来源:origin: 1993hzw/Androids

public void onAnimationEnd(
      Animator animation) {
    mScrollView.removeAllViews();
    mScrollView.setVisibility(View.GONE);
    mPortraitShield.setVisibility(View.GONE);
  }
}));

代码示例来源:origin: envyfan/AndroidReview

private void preLoadLayout() {
  mMainLayout.setVisibility(View.GONE);
  mFAB.setVisibility(View.GONE);
  mTestEmpty.setVisibility(View.GONE);
  mLoadingLayout.setLoadingLayout(LoadingLayout.NETWORK_LOADING);
}

代码示例来源:origin: envyfan/AndroidReview

private void postLoadLayout() {
  mMainLayout.setVisibility(View.VISIBLE);
  mFAB.setVisibility(View.VISIBLE);
  mTestEmpty.setVisibility(View.GONE);
  mLoadingLayout.setLoadingLayout(LoadingLayout.HIDE_LAYOUT);
}

代码示例来源:origin: envyfan/AndroidReview

private void errorLoadLayout() {
  mMainLayout.setVisibility(View.GONE);
  mFAB.setVisibility(View.GONE);
  mTestEmpty.setVisibility(View.GONE);
  mLoadingLayout.setLoadingLayout(LoadingLayout.NETWORK_ERROR);
}

代码示例来源:origin: vinsol-spree-contrib/spree-android

private void showViewModeContent() {
  noAddressFoundContainer.setVisibility(View.GONE);
  addressListView.setVisibility(View.VISIBLE);
  addAddressBtn.setVisibility(View.VISIBLE);
  addOrEditContainer.setVisibility(View.GONE);
  setValuesBasedOnMode();
}

代码示例来源:origin: vinsol-spree-contrib/spree-android

private void showAddOrEditModeContent() {
  noAddressFoundContainer.setVisibility(View.GONE);
  addressListView.setVisibility(View.GONE);
  addAddressBtn.setVisibility(View.GONE);
  addOrEditContainer.setVisibility(View.VISIBLE);
  setValuesBasedOnMode();
}

相关文章

ScrollView类方法