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


Java SeekBar.OnSeekBarChangeListener方法代码示例

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


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

示例1: createRotateTab

import android.widget.SeekBar; //导入方法依赖的package包/类
private void createRotateTab(final LayoutInflater inflater, final ViewGroup container, final SeekBar.OnSeekBarChangeListener listener) {
    TabHost.TabSpec spec;

    spec = mTabHost.newTabSpec(getString(R.string.rotate_tab));
    spec.setIndicator(createTabView(inflater, container, getString(R.string.rotate_title)));

    spec.setContent(new TabHost.TabContentFactory() {

        @Override
        public View createTabContent(String tag) {

            View view = inflater.inflate(R.layout.fragment_rotate, container, false);

            mRotateSeekBar = (RangeSeekBar) view.findViewById(R.id.rotate_seekBar);
            mRotateSeekBar.setRange(getResources().getIntArray(R.array.angle_seekbar_values));
            mRotateSeekBar.setOnSeekBarChangeListener(listener);

            return (view);

        }
    });
    mTabHost.addTab(spec);
}
 
开发者ID:hollaus,项目名称:TinyPlanetMaker,代码行数:24,代码来源:TabFragment.java

示例2: createWarpTab

import android.widget.SeekBar; //导入方法依赖的package包/类
private void createWarpTab(final LayoutInflater inflater, final ViewGroup container, final SeekBar.OnSeekBarChangeListener listener) {
    TabHost.TabSpec spec = mTabHost.newTabSpec(getString(R.string.warp_tab));
    spec.setIndicator(createTabView(inflater, container, getString(R.string.warp_title)));

    spec.setContent(new TabHost.TabContentFactory() {

        @Override
        public View createTabContent(String tag) {

            View view = inflater.inflate(R.layout.fragment_warp, container, false);
            mWarpSeekBar = (RangeSeekBar) view.findViewById(R.id.warp_seekBar);
            mWarpSeekBar.setRange(getResources().getIntArray(R.array.size_seekbar_values));
            mWarpSeekBar.setOnSeekBarChangeListener(listener);

            return (view);
        }
    });
    mTabHost.addTab(spec);
}
 
开发者ID:hollaus,项目名称:TinyPlanetMaker,代码行数:20,代码来源:TabFragment.java

示例3: onCreateView

import android.widget.SeekBar; //导入方法依赖的package包/类
@Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {

        View view = inflater.inflate(R.layout.fragment_settings, container, false);

        SeekBar.OnSeekBarChangeListener listener = getSeekBarListener();

        super.onResume();


        sizeSeekBar = (RangeSeekBar) view.findViewById(R.id.size_seekBar);
        sizeSeekBar.setRange(getResources().getIntArray(R.array.size_seekbar_values));
        sizeSeekBar.setOnSeekBarChangeListener(listener);

//        scaleSeekBar = (RangeSeekBar) view.findViewById(R.id.scale_seekBar);
//        scaleSeekBar.setRange(getResources().getIntArray(R.array.scale_seekbar_values));
//        scaleSeekBar.setOnSeekBarChangeListener(listener);

        angleSeekBar = (RangeSeekBar) view.findViewById(R.id.angle_seekBar);
        angleSeekBar.setRange(getResources().getIntArray(R.array.angle_seekbar_values));
        angleSeekBar.setOnSeekBarChangeListener(listener);

        return view;

    }
 
开发者ID:hollaus,项目名称:TinyPlanetMaker,代码行数:27,代码来源:SettingsFragment.java

示例4: createZoomTab

import android.widget.SeekBar; //导入方法依赖的package包/类
private void createZoomTab(final LayoutInflater inflater, final ViewGroup container, final SeekBar.OnSeekBarChangeListener listener) {
    TabHost.TabSpec spec;

    spec = mTabHost.newTabSpec(getString(R.string.zoom_tab));
    spec.setIndicator(createTabView(inflater, container, getString(R.string.zoom_title)));

    spec.setContent(new TabHost.TabContentFactory() {

        @Override
        public View createTabContent(String tag) {

            View view = inflater.inflate(R.layout.fragment_zoom, container, false);

            mZoomSeekBar = (RangeSeekBar) view.findViewById(R.id.zoom_seekBar);
            mZoomSeekBar.setRange(getResources().getIntArray(R.array.zoom_seekbar_values));
            mZoomSeekBar.setOnSeekBarChangeListener(listener);

            return (view);

        }
    });

    mTabHost.addTab(spec);
}
 
开发者ID:hollaus,项目名称:TinyPlanetMaker,代码行数:25,代码来源:TabFragment.java

示例5: setUpSeekBar

import android.widget.SeekBar; //导入方法依赖的package包/类
public static void setUpSeekBar(Dialog dialog, @IdRes int seekBarId, int progress, SeekBar.OnSeekBarChangeListener listener) {
    final SeekBar seekBar = (SeekBar) dialog.findViewById(seekBarId);
    seekBar.setOnSeekBarChangeListener(listener);
    seekBar.setProgress(progress);
}
 
开发者ID:ABTSoftware,项目名称:SciChart.Android.Examples,代码行数:6,代码来源:ViewSettingsUtil.java

示例6: onCreateView

import android.widget.SeekBar; //导入方法依赖的package包/类
@Override
    public View onCreateView(final LayoutInflater inflater, final ViewGroup container,
                             Bundle savedInstanceState) {

        View rootView;

        final SeekBar.OnSeekBarChangeListener listener = getSeekBarListener();

        rootView = inflater.inflate(R.layout.tablayout_settings, container, false);

        mTabHost = (TabHost) rootView.findViewById(R.id.tab_host);
        mTabHost.setup();
        mTabHost.setOnTabChangedListener(new AnimatedTabHostListener(mTabHost));

        createWarpTab(inflater, container, listener);
        createRotateTab(inflater, container, listener);
        createZoomTab(inflater, container, listener);
        createInvertTab(inflater, container);
        createCropTab(inflater, container);
//        createFadeTab(inflater, container);



        // Initialize the tabs. Otherwise they will be initialized after the user clicks on them, but we need to connect the sliders to the callback:
        for (int i = mTabHost.getTabWidget().getTabCount() - 1; i >= 0; i--)
            mTabHost.setCurrentTab(i);

        return rootView;

    }
 
开发者ID:hollaus,项目名称:TinyPlanetMaker,代码行数:31,代码来源:TabFragment.java

示例7: seekBarChanged

import android.widget.SeekBar; //导入方法依赖的package包/类
/**
 * Sets a listener for seek bar change events
 *
 * Note: Do not use this method in conjunction with the methods stopTrackingTouch(),
 * startTrackingTouch() and progressChanged().
 *
 * @param listener The listener to set
 * @return The current AQuery object
 *
 * @throws IllegalViewActionException If the view is not a SeekBar
 * @see IllegalViewActionException
 *
 * @throws IllegalArgumentException If the listener is null
 */
public AQ seekBarChanged(@NonNull final SeekBar.OnSeekBarChangeListener listener) {
    requireNotNull(listener);
    if (raw() instanceof SeekBar) {
        ((SeekBar) raw()).setOnSeekBarChangeListener(listener);
        return this;
    } else {
        throw new IllegalViewActionException();
    }
}
 
开发者ID:mzaart,项目名称:AQuery,代码行数:24,代码来源:AQ.java


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