android.widget.ImageButton.setOnFocusChangeListener()方法的使用及代码示例

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

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

ImageButton.setOnFocusChangeListener介绍

暂无

代码示例

代码示例来源:origin: brianwernick/ExoMedia

@Override
protected void registerListeners() {
  super.registerListeners();
  rewindButton.setOnClickListener(new OnClickListener() {
    @Override
    public void onClick(View v) {
      onRewindClick();
    }
  });
  fastForwardButton.setOnClickListener(new OnClickListener() {
    @Override
    public void onClick(View v) {
      onFastForwardClick();
    }
  });
  //Registers the buttons for focus changes in order to update the ripple selector
  previousButton.setOnFocusChangeListener(buttonFocusChangeListener);
  rewindButton.setOnFocusChangeListener(buttonFocusChangeListener);
  playPauseButton.setOnFocusChangeListener(buttonFocusChangeListener);
  fastForwardButton.setOnFocusChangeListener(buttonFocusChangeListener);
  nextButton.setOnFocusChangeListener(buttonFocusChangeListener);
}

代码示例来源:origin: bitstadium/HockeySDK-Android

imageButton.setOnFocusChangeListener(new OnFocusChangeListener() {
  @Override
  public void onFocusChange(View v, boolean hasFocus) {

代码示例来源:origin: abrenoch/hyperion-android-grabber

private void initActivity() {
  // assume the recorder is not running until we are notified otherwise
  mRecorderRunning = false;
  setContentView(R.layout.activity_main);
  AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
  mMediaProjectionManager = (MediaProjectionManager)
                  getSystemService(Context.MEDIA_PROJECTION_SERVICE);
  ImageView iv = findViewById(R.id.power_toggle);
  iv.setOnClickListener(this);
  iv.setOnFocusChangeListener(this);
  iv.setFocusable(true);
  iv.requestFocus();
  ImageButton ib = findViewById(R.id.settingsButton);
  ib.setOnClickListener(this);
  ib.setOnFocusChangeListener(this);
  ib.setFocusable(true);
  setImageViews(mRecorderRunning, false);
  LocalBroadcastManager.getInstance(this).registerReceiver(
      mMessageReceiver, new IntentFilter(BROADCAST_FILTER));
  // request an update on the running status
  checkForInstance();
}

相关文章

ImageButton类方法