当前位置: 首页>>代码示例>>Java>>正文


Java OnSeekBarChangeListener类代码示例

本文整理汇总了Java中android.widget.SeekBar.OnSeekBarChangeListener的典型用法代码示例。如果您正苦于以下问题:Java OnSeekBarChangeListener类的具体用法?Java OnSeekBarChangeListener怎么用?Java OnSeekBarChangeListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


OnSeekBarChangeListener类属于android.widget.SeekBar包,在下文中一共展示了OnSeekBarChangeListener类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: ColorPickerAdvancedComponent

import android.widget.SeekBar.OnSeekBarChangeListener; //导入依赖的package包/类
/**
 * Initializes the views.
 *
 * @param rootView View that contains all the content, such as the label, gradient view, etc.
 * @param textResourceId The resource ID of the text to show on the label.
 * @param seekBarMax The range of the seek bar.
 * @param seekBarListener The listener for when the seek bar value changes.
 */
ColorPickerAdvancedComponent(final View rootView,
        final int textResourceId,
        final int seekBarMax,
        final OnSeekBarChangeListener seekBarListener) {
    mGradientView = rootView.findViewById(R.id.gradient);
    mText = (TextView) rootView.findViewById(R.id.text);
    mText.setText(textResourceId);
    mGradientDrawable = new GradientDrawable(GradientDrawable.Orientation.LEFT_RIGHT, null);
    mSeekBar = (SeekBar) rootView.findViewById(R.id.seek_bar);
    mSeekBar.setOnSeekBarChangeListener(seekBarListener);
    mSeekBar.setMax(seekBarMax);
    // Setting the thumb offset means the seek bar thumb can move all the way to each end
    // of the gradient view.
    Context context = rootView.getContext();
    int offset = ApiCompatibilityUtils.getDrawable(context.getResources(),
            R.drawable.color_picker_advanced_select_handle).getIntrinsicWidth();
    mSeekBar.setThumbOffset(offset / 2);
}
 
开发者ID:mogoweb,项目名称:365browser,代码行数:27,代码来源:ColorPickerAdvancedComponent.java

示例2: ColorPickerAdvancedComponent

import android.widget.SeekBar.OnSeekBarChangeListener; //导入依赖的package包/类
/**
 * Initializes the views.
 *
 * @param rootView View that contains all the content, such as the label, gradient view, etc.
 * @param textResourceId The resource ID of the text to show on the label.
 * @param seekBarMax The range of the seek bar.
 * @param seekBarListener The listener for when the seek bar value changes.
 */
ColorPickerAdvancedComponent(final View rootView,
        final int textResourceId,
        final int seekBarMax,
        final OnSeekBarChangeListener seekBarListener) {
    mGradientView = rootView.findViewById(R.id.gradient);
    mText = (TextView) rootView.findViewById(R.id.text);
    mText.setText(textResourceId);
    mGradientDrawable = new GradientDrawable(GradientDrawable.Orientation.LEFT_RIGHT, null);
    mSeekBar = (SeekBar) rootView.findViewById(R.id.seek_bar);
    mSeekBar.setOnSeekBarChangeListener(seekBarListener);
    mSeekBar.setMax(seekBarMax);
    // Setting the thumb offset means the seek bar thumb can move all the way to each end
    // of the gradient view.
    Context context = rootView.getContext();
    int offset = context.getResources()
                        .getDrawable(R.drawable.color_picker_advanced_select_handle)
                        .getIntrinsicWidth();
    mSeekBar.setThumbOffset(offset / 2);
}
 
开发者ID:openresearch,项目名称:android-chromium-view,代码行数:28,代码来源:ColorPickerAdvancedComponent.java

示例3: setOnSeekBarChangeListener

import android.widget.SeekBar.OnSeekBarChangeListener; //导入依赖的package包/类
/**
 * 設置進度條的進度改變時的監聽事件
 * @param l
 */
public void setOnSeekBarChangeListener(OnSeekBarChangeListener l){
	if(m_seekBars[0] == null ||m_seekBars[1] == null){
		return;
	}
	
	m_seekBars[0].setOnSeekBarChangeListener(l);
}
 
开发者ID:hubert1002,项目名称:WiCamera3D,代码行数:12,代码来源:CSSeekBar.java

示例4: createAndAddNewGradient

import android.widget.SeekBar.OnSeekBarChangeListener; //导入依赖的package包/类
/**
 * Creates a new GradientDetails object from the parameters provided, initializes it,
 * and adds it to this advanced view.
 *
 * @param textResourceId The text to display for the label.
 * @param seekBarMax The maximum value of the seek bar for the gradient.
 * @param seekBarListener Object listening to when the user changes the seek bar.
 *
 * @return A new GradientDetails object initialized with the given parameters.
 */
public ColorPickerAdvancedComponent createAndAddNewGradient(int textResourceId,
        int seekBarMax,
        OnSeekBarChangeListener seekBarListener) {
    LayoutInflater inflater = (LayoutInflater) getContext()
            .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    View newComponent = inflater.inflate(R.layout.color_picker_advanced_component, null);
    addView(newComponent);

    return new ColorPickerAdvancedComponent(newComponent,
            textResourceId,
            seekBarMax,
            seekBarListener);
}
 
开发者ID:mogoweb,项目名称:365browser,代码行数:24,代码来源:ColorPickerAdvanced.java

示例5: setOnSeekBarChangeListener

import android.widget.SeekBar.OnSeekBarChangeListener; //导入依赖的package包/类
public OnSeekBarChangeListener setOnSeekBarChangeListener(OnSeekBarChangeListener l) {
  if (l instanceof ProxyChangeListener) {
    listener = (ProxyChangeListener) l;
  } else {
    listener.setExternalListener(l);
  }
  return listener;
}
 
开发者ID:techery,项目名称:progresshint,代码行数:9,代码来源:ProgressHintDelegate.java

示例6: setOnSeekBarChangeListener

import android.widget.SeekBar.OnSeekBarChangeListener; //导入依赖的package包/类
/**
* @see SeekBar#setOnSeekBarChangeListener(OnSeekBarChangeListener)
*/
 public W setOnSeekBarChangeListener(OnSeekBarChangeListener l) {
     mView.setOnSeekBarChangeListener(l);
     return (W) this;
 }
 
开发者ID:AnthZh,项目名称:AndroidViewHelper,代码行数:8,代码来源:SeekBarWrapper.java

示例7: createVolumeChangeListener

import android.widget.SeekBar.OnSeekBarChangeListener; //导入依赖的package包/类
private OnSeekBarChangeListener createVolumeChangeListener() {
	return createShortLevelChangeListener(TGUpdateChannelAction.ATTRIBUTE_VOLUME);
}
 
开发者ID:axlecho,项目名称:tuxguitar,代码行数:4,代码来源:TGChannelEditDialog.java

示例8: createBalanceChangeListener

import android.widget.SeekBar.OnSeekBarChangeListener; //导入依赖的package包/类
private OnSeekBarChangeListener createBalanceChangeListener() {
	return createShortLevelChangeListener(TGUpdateChannelAction.ATTRIBUTE_BALANCE);
}
 
开发者ID:axlecho,项目名称:tuxguitar,代码行数:4,代码来源:TGChannelEditDialog.java

示例9: createReverbChangeListener

import android.widget.SeekBar.OnSeekBarChangeListener; //导入依赖的package包/类
private OnSeekBarChangeListener createReverbChangeListener() {
	return createShortLevelChangeListener(TGUpdateChannelAction.ATTRIBUTE_REVERB);
}
 
开发者ID:axlecho,项目名称:tuxguitar,代码行数:4,代码来源:TGChannelEditDialog.java

示例10: createChorusChangeListener

import android.widget.SeekBar.OnSeekBarChangeListener; //导入依赖的package包/类
private OnSeekBarChangeListener createChorusChangeListener() {
	return createShortLevelChangeListener(TGUpdateChannelAction.ATTRIBUTE_CHORUS);
}
 
开发者ID:axlecho,项目名称:tuxguitar,代码行数:4,代码来源:TGChannelEditDialog.java

示例11: createPhaserChangeListener

import android.widget.SeekBar.OnSeekBarChangeListener; //导入依赖的package包/类
private OnSeekBarChangeListener createPhaserChangeListener() {
	return createShortLevelChangeListener(TGUpdateChannelAction.ATTRIBUTE_PHASER);
}
 
开发者ID:axlecho,项目名称:tuxguitar,代码行数:4,代码来源:TGChannelEditDialog.java

示例12: createTremoloChangeListener

import android.widget.SeekBar.OnSeekBarChangeListener; //导入依赖的package包/类
private OnSeekBarChangeListener createTremoloChangeListener() {
	return createShortLevelChangeListener(TGUpdateChannelAction.ATTRIBUTE_TREMOLO);
}
 
开发者ID:axlecho,项目名称:tuxguitar,代码行数:4,代码来源:TGChannelEditDialog.java

示例13: setOnSeekBarChangeListener

import android.widget.SeekBar.OnSeekBarChangeListener; //导入依赖的package包/类
public void setOnSeekBarChangeListener(OnSeekBarChangeListener onSeekBarChangeListener) {
	getSeekbar().setOnSeekBarChangeListener(onSeekBarChangeListener);
}
 
开发者ID:voudeonibus,项目名称:vdb-android,代码行数:4,代码来源:SeekbarWithIntervals.java

示例14: setOnSeekBarPrefChangeListener

import android.widget.SeekBar.OnSeekBarChangeListener; //导入依赖的package包/类
public void setOnSeekBarPrefChangeListener(OnSeekBarChangeListener listener) {
	mExternalListener = listener;
}
 
开发者ID:hvmunlimited,项目名称:QuickControlPanel,代码行数:4,代码来源:SliderPreference.java

示例15: bindOnSeekListener

import android.widget.SeekBar.OnSeekBarChangeListener; //导入依赖的package包/类
@BindingAdapter("onSeekListener")
public static void bindOnSeekListener(SeekBar seekBar, OnSeekBarChangeListener listener) {
    seekBar.setOnSeekBarChangeListener(listener);
}
 
开发者ID:marverenic,项目名称:Jockey,代码行数:5,代码来源:NowPlayingControllerViewModel.java


注:本文中的android.widget.SeekBar.OnSeekBarChangeListener类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。