android.widget.TextView.getVisibility()方法的使用及代码示例

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

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

TextView.getVisibility介绍

暂无

代码示例

代码示例来源:origin: k9mail/k-9

public boolean additionalHeadersVisible() {
  return (mAdditionalHeadersView != null &&
      mAdditionalHeadersView.getVisibility() == View.VISIBLE);
}

代码示例来源:origin: smuyyh/BookReader

public boolean isTipViewVisible() {
  return tipView.getVisibility() == View.VISIBLE;
}

代码示例来源:origin: robolectric/robolectric

/**
 * Returns the text string of this {@code TextView}.
 *
 * Robolectric extension.
 */
@Override
public String innerText() {
 CharSequence text = realTextView.getText();
 return (text == null || realTextView.getVisibility() != View.VISIBLE) ? "" : text.toString();
}

代码示例来源:origin: jaydenxiao2016/AndroidFire

@Override
  public void call(Object o) {
    if (photoDetailTitleTv.getVisibility() == View.VISIBLE) {
      startAnimation(View.GONE, 0.9f, 0.5f);
    } else {
      photoDetailTitleTv.setVisibility(View.VISIBLE);
      startAnimation(View.VISIBLE, 0.5f, 0.9f);
    }
  }
});

代码示例来源:origin: Clans/FloatingActionButton

public int getLabelVisibility() {
  TextView labelView = getLabelView();
  if (labelView != null) {
    return labelView.getVisibility();
  }
  return -1;
}

代码示例来源:origin: Rukey7/MvpApp

@Override
public void loadData(List<VideoInfo> dataList) {
  if (mDefaultBg.getVisibility() == View.VISIBLE) {
    mDefaultBg.setVisibility(View.GONE);
  }
  mAdapter.updateItems(dataList);
}

代码示例来源:origin: Rukey7/MvpApp

@Override
  public void call(VideoInfo info) {
    mAdapter.addItem(info);
    if (mDefaultBg.getVisibility() == View.VISIBLE) {
      mDefaultBg.setVisibility(View.GONE);
    }
  }
});

代码示例来源:origin: Rukey7/MvpApp

@Override
public void loadData(List<VideoInfo> photoList) {
  if (mDefaultBg.getVisibility() == View.VISIBLE) {
    mDefaultBg.setVisibility(View.GONE);
  }
  mAdapter.updateItems(photoList);
}

代码示例来源:origin: Rukey7/MvpApp

@Override
public void loadData(List<BeautyPhotoInfo> photoList) {
  if (mDefaultBg.getVisibility() == View.VISIBLE) {
    mDefaultBg.setVisibility(View.GONE);
  }
  mAdapter.updateItems(photoList);
}

代码示例来源:origin: Rukey7/MvpApp

@Override
public void loadData(List<VideoInfo> dataList) {
  if (mDefaultBg.getVisibility() == View.VISIBLE) {
    mDefaultBg.setVisibility(View.GONE);
  }
  mAdapter.updateItems(dataList);
}

代码示例来源:origin: Rukey7/MvpApp

/**
 * 设置快进
 *
 * @param time
 */
private void _setFastForward(String time) {
  if (mFlTouchLayout.getVisibility() == View.GONE) {
    mFlTouchLayout.setVisibility(View.VISIBLE);
  }
  if (mTvFastForward.getVisibility() == View.GONE) {
    mTvFastForward.setVisibility(View.VISIBLE);
  }
  mTvFastForward.setText(time);
}

代码示例来源:origin: Rukey7/MvpApp

/**
 * 设置亮度控制显示
 *
 * @param brightness
 */
private void _setBrightnessInfo(float brightness) {
  if (mFlTouchLayout.getVisibility() == View.GONE) {
    mFlTouchLayout.setVisibility(View.VISIBLE);
  }
  if (mTvBrightness.getVisibility() == View.GONE) {
    mTvBrightness.setVisibility(View.VISIBLE);
  }
  mTvBrightness.setText(Math.ceil(brightness * 100) + "%");
}

代码示例来源:origin: Rukey7/MvpApp

/**
 * 设置声音控制显示
 *
 * @param volume
 */
private void _setVolumeInfo(int volume) {
  if (mFlTouchLayout.getVisibility() == View.GONE) {
    mFlTouchLayout.setVisibility(View.VISIBLE);
  }
  if (mTvVolume.getVisibility() == View.GONE) {
    mTvVolume.setVisibility(View.VISIBLE);
  }
  mTvVolume.setText((volume * 100 / mMaxVolume) + "%");
}

代码示例来源:origin: Rukey7/MvpApp

@Override
  public void onRemove(int position) {
    if (mAdapter.getItemCount() <= 1 && mDefaultBg.getVisibility() == View.GONE) {
      mDefaultBg.setVisibility(View.VISIBLE);
      ((DownloadActivity)getActivity()).enableEditMode(false);
    }
  }
});

代码示例来源:origin: Rukey7/MvpApp

@Override
  public void onRemove(int position) {
    if (mAdapter.getItemCount() <= 1 && mDefaultBg.getVisibility() == View.GONE) {
      mDefaultBg.setVisibility(View.VISIBLE);
      ((DownloadActivity)getActivity()).enableEditMode(false);
    }
  }
});

代码示例来源:origin: wangdan/AisenWeiBo

void sendContent(View v) {
  if (txtErrorHint.getVisibility() == View.VISIBLE) {
    showMessage(txtErrorHint.getText().toString());
    return;
  }
  if (checkValid(getPublishBean()))
    send();
}

代码示例来源:origin: naman14/Timber

@Override
public boolean onTouchEvent(@NonNull MotionEvent event) {
  final int action = event.getAction();
  switch (action) {
    case MotionEvent.ACTION_DOWN:
      if (event.getX() < handle.getX())
        return false;
      if (currentAnimator != null)
        currentAnimator.cancel();
      if (bubble.getVisibility() == INVISIBLE)
        showBubble();
      handle.setSelected(true);
    case MotionEvent.ACTION_MOVE:
      final float y = event.getY();
      setBubbleAndHandlePosition(y);
      setRecyclerViewPosition(y);
      return true;
    case MotionEvent.ACTION_UP:
    case MotionEvent.ACTION_CANCEL:
      handle.setSelected(false);
      hideBubble();
      return true;
  }
  return super.onTouchEvent(event);
}

代码示例来源:origin: k9mail/k-9

public void onShowAdditionalHeaders() {
  int currentVisibility = mAdditionalHeadersView.getVisibility();
  if (currentVisibility == View.VISIBLE) {
    hideAdditionalHeaders();
    expand(mToView, false);
    expand(mCcView, false);
  } else {
    showAdditionalHeaders();
    expand(mToView, true);
    expand(mCcView, true);
  }
  layoutChanged();
}

代码示例来源:origin: rey5137/material

if(mNameView.getVisibility() == View.VISIBLE){
  if(mAddressView.getVisibility() == View.VISIBLE){
    childTop = (childBottom - mNameView.getMeasuredHeight() - mAddressView.getMeasuredHeight()) / 2;
    mNameView.layout(childLeft, childTop, childRight - mSpacing, childTop + mNameView.getMeasuredHeight());
else if(mAddressView.getVisibility() == View.VISIBLE){
  childTop = (childBottom - mAddressView.getMeasuredHeight()) / 2;
  mAddressView.layout(childLeft, childTop, childRight - mSpacing, childTop + mAddressView.getMeasuredHeight());

代码示例来源:origin: wangdan/AisenWeiBo

@Override
public void onClick(View v) {
  if (txtFollowersNewHint != null && txtFollowersNewHint.getVisibility() == View.VISIBLE) {
    ((MainActivity) menuFragment.getActivity()).closeDrawer();
    FriendshipPagerFragment.launch(menuFragment.getActivity(), AppContext.getAccount().getUser(), 1);
  }
  else {
    BizFragment.createBizFragment(menuFragment).launchProfile(AppContext.getAccount().getUser());
  }
}

相关文章

TextView类方法