android.widget.ImageView.isSelected()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(6.6k)|赞(0)|评价(0)|浏览(196)

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

ImageView.isSelected介绍

暂无

代码示例

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

/**
 * 切换弹幕的显示/隐藏
 */
private void _toggleDanmakuShow() {
  if (mIvDanmakuControl.isSelected()) {
    showOrHideDanmaku(true);
  } else {
    showOrHideDanmaku(false);
  }
}

代码示例来源:origin: jiajunhui/PlayerBase

@OnClick({
    R.id.cover_player_controller_image_view_back_icon,
    R.id.cover_player_controller_image_view_play_state,
    R.id.cover_player_controller_image_view_switch_screen})
public void onViewClick(View view){
  switch (view.getId()){
    case R.id.cover_player_controller_image_view_back_icon:
      notifyReceiverEvent(DataInter.Event.EVENT_CODE_REQUEST_BACK, null);
      break;
    case R.id.cover_player_controller_image_view_play_state:
      boolean selected = mStateIcon.isSelected();
      if(selected){
        requestResume(null);
      }else{
        requestPause(null);
      }
      mStateIcon.setSelected(!selected);
      break;
    case R.id.cover_player_controller_image_view_switch_screen:
      notifyReceiverEvent(DataInter.Event.EVENT_CODE_REQUEST_TOGGLE_SCREEN, null);
      break;
  }
}

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

mInterruptPosition = 0;
if (!mIvPlay.isSelected()) {

代码示例来源:origin: RoyWallace/BottomNavigationBar

public boolean isSelected() {
  return imageView.isSelected();
}

代码示例来源:origin: akshay2211/PixImagePicker

@Override
public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
  if (!mHandleView.isSelected() && recyclerView.isEnabled()) {
    setViewPositions(getScrollProportion(recyclerView));
  }
}

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

private void updateLockStatus() {
  boolean show = canShowLeftSideView();
  polyvScreenLockAudio.setVisibility(show ? VISIBLE : GONE);
  polyvScreenLock.setVisibility(show ? GONE : VISIBLE);
  sensorHelper.toggle(!polyvScreenLockAudio.isSelected() && !polyvScreenLock.isSelected(),true);
}

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

public boolean isLocked() {
  return PolyvScreenUtils.isLandscape(getContext()) &&
      (polyvScreenLock.isSelected() || polyvScreenLockAudio.isSelected());
}

代码示例来源:origin: GaoGersy/MultiSelecter

@Override
  public void onClick(View v) {
    if (!mIvSelectAll.isSelected()) {
      List selectionList = mAdapter.getSelectionList();
      mIconListRvAdapter.addAllData(selectionList);
    } else {
      mIconListRvAdapter.clear();
    }
    mAdapter.changeAllDataStatus(!mIvSelectAll.isSelected());
    refreshLayout(!mIvSelectAll.isSelected());
  }
});

代码示例来源:origin: GaoGersy/MultiSelecter

@Override
  public void onClick(View v) {
    if (!mIvSelectAll.isSelected()) {
      List selectionList = mAdapter.getSelectionList();
      mIconListRvAdapter.addAllData(selectionList);
    } else {
      mIconListRvAdapter.clear();
    }
    mAdapter.changeAllDataStatus(!mIvSelectAll.isSelected());
    refreshLayout(!mIvSelectAll.isSelected());
  }
});

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

@Override
  protected void onConfigurationChanged(Configuration newConfig) {
    super.onConfigurationChanged(newConfig);
    if (iv_land != null) {
      iv_land.setSelected(newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE);
      if (iv_land.isSelected()) {
        iv_land.setImageResource(R.drawable.polyv_btn_exitfulls);
      } else {
        iv_land.setImageResource(R.drawable.polyv_btn_fullscreen);
      }
    }
  }
}

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

/**
 * 切换弹幕的显示/隐藏
 */
private void _toggleDanmakuShow() {
  if (mIvDanmakuControl.isSelected()) {
    showOrHideDanmaku(true);
  } else {
    showOrHideDanmaku(false);
  }
}

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

@Override
  public void onClick(View v) {
    if (iv_screencast_search.isSelected()) {
      fl_screencast_search.hide(true);
    } else {
      fl_screencast_search.show();
    }
  }
});

代码示例来源:origin: arvinljw/PictureSelector

private void onPencilChoose() {
  mImgText.setSelected(false);
  mImgResize.setSelected(false);
  mImgPencil.setSelected(!mImgPencil.isSelected());
  mTvFlexible.setCanTouch(false);
  if (mImgPencil.isSelected()) {
    mRoot.findViewById(R.id.ps_layout_pencil_tool).setVisibility(View.VISIBLE);
    mGraffiti.setColor(mColorBar.getColor());
    mGraffiti.setCanDraw(true);
  } else {
    mRoot.findViewById(R.id.ps_layout_pencil_tool).setVisibility(View.GONE);
    mGraffiti.setCanDraw(false);
  }
}

代码示例来源:origin: oubowu/YinyuetaiPlayer

@Override
public void onStopTrackingTouch(SeekBar seekBar) {
  mIsUserTouch = false;
  if (mIvPlay.isSelected()) {
    mHandler.sendEmptyMessageDelayed(PLAY_PROGRESS, 0);
    mHandler.sendEmptyMessageDelayed(HIDE_DELAY, HIDE_DELAY_DURATION);
    mIjkVideoView.start();
  }
}

代码示例来源:origin: arvinljw/PictureSelector

private void onResizeChoose() {
  mImgPencil.setSelected(false);
  mImgText.setSelected(false);
  mImgResize.setSelected(!mImgResize.isSelected());
  mRoot.findViewById(R.id.ps_layout_pencil_tool).setVisibility(View.GONE);
  mGraffiti.setCanDraw(false);
  mTvFlexible.setCanTouch(false);
}

代码示例来源:origin: L4Digital/FastScroll

@Override
  public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
    super.onScrollStateChanged(recyclerView, newState);
    if (isEnabled()) {
      switch (newState) {
      case RecyclerView.SCROLL_STATE_DRAGGING:
        getHandler().removeCallbacks(scrollbarHider);
        cancelAnimation(scrollbarAnimator);
        if (!isViewVisible(scrollbar)) {
          showScrollbar();
        }
        break;
      case RecyclerView.SCROLL_STATE_IDLE:
        if (hideScrollbar && !handleView.isSelected()) {
          getHandler().postDelayed(scrollbarHider, SCROLLBAR_HIDE_DELAY);
        }
        break;
      }
    }
  }
};

代码示例来源:origin: arvinljw/PictureSelector

private void onTextChoose() {
  mImgPencil.setSelected(false);
  mImgResize.setSelected(false);
  mImgText.setSelected(!mImgText.isSelected());
  mRoot.findViewById(R.id.ps_layout_pencil_tool).setVisibility(View.GONE);
  mGraffiti.setCanDraw(false);
  if (mImgText.isSelected()) {
    String text = mTvFlexible.getText();
    if (TextUtils.isEmpty(text)) {
      showEditView(text);
    }
    mTvFlexible.setCanTouch(true);
  } else {
    mTvFlexible.setCanTouch(false);
  }
}

代码示例来源:origin: L4Digital/FastScroll

@Override
public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
  if (!handleView.isSelected() && isEnabled()) {
    setViewPositions(getScrollProportion(recyclerView));
  }
  if (swipeRefreshLayout != null) {
    int firstVisibleItem = findFirstVisibleItemPosition(recyclerView.getLayoutManager());
    int topPosition = recyclerView.getChildCount() == 0 ? 0 : recyclerView.getChildAt(0).getTop();
    swipeRefreshLayout.setEnabled(firstVisibleItem == 0 && topPosition >= 0);
  }
}

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

private void resetControllerLayout() {
  if(polyvScreenLock.isSelected() || polyvScreenLockAudio.isSelected()){
    return;
  }
  hide();
  PolyvScreenUtils.reSetStatusBar(videoActivity);
  if (PolyvScreenUtils.isLandscape(mContext)) {
    // 横屏下开启自动切换横竖屏
    sensorHelper.toggle(true, true);
    initLandScapeWH();
  } else {
    // 竖屏下开启自动切换横竖屏
    sensorHelper.toggle(true, false);
    initPortraitWH();
  }
}

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

private void resetDmSwitchView() {
  if (iv_dmswitch.isSelected()) {
    iv_dmswitch.setSelected(false);
    danmuFragment.show();
  } else {
    iv_dmswitch.setSelected(true);
    danmuFragment.hide();
  }
}

相关文章

ImageView类方法