當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。