• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java RangeSeekBar类的典型用法和代码示例

java 1次浏览

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

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

示例1: onCreateView

点赞 2

import com.yahoo.mobile.client.android.util.rangeseekbar.RangeSeekBar; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    // Inflate the diet_raw_layout for this fragment

    ViewGroup rootView = (ViewGroup)inflater.inflate(R.layout.fragment_settings, container, false);
    // Inflate the diet_raw_layout for this fragment


    lv = (ListView) rootView.findViewById(R.id.ingr_listviewSett);
    lv2 = (ListView) rootView.findViewById(R.id.dietListSett);
    calorieSeekBar = (RangeSeekBar<Integer>) rootView.findViewById(R.id.seekbarForCalorieSett);
    calorieSeekBar.setOnRangeSeekBarChangeListener(seekBarChnaged());
    fatSeekBar = (RangeSeekBar<Integer>) rootView.findViewById(R.id.seekBarForFatSett);
    fatSeekBar.setOnRangeSeekBarChangeListener(seekBarChnaged());
    proSeekBar = (RangeSeekBar<Integer>) rootView.findViewById(R.id.rangeSeekBarForProSett);
    proSeekBar.setOnRangeSeekBarChangeListener(seekBarChnaged());
    carbSeekBar = (RangeSeekBar<Integer>) rootView.findViewById(R.id.seekBarForCabSett);
    carbSeekBar.setOnRangeSeekBarChangeListener(seekBarChnaged());
    mtext1 = (MultiAutoCompleteTextView)rootView.findViewById(R.id.multiAutoCompleteTextView1Sett);
    saveBut = (Button) rootView.findViewById(R.id.saveDietSett);
    name = (EditText) rootView.findViewById(R.id.editTextNameSett);
    descr = (EditText)rootView.findViewById(R.id.editTextDescSett);
    return  rootView;


}
 

开发者ID:bounswe,
项目名称:bounswe2016group2,
代码行数:28,
代码来源:SettingsFragment.java

示例2: seekBarChnaged

点赞 2

import com.yahoo.mobile.client.android.util.rangeseekbar.RangeSeekBar; //导入依赖的package包/类
private RangeSeekBar.OnRangeSeekBarChangeListener<Integer> seekBarChnaged() {
    return new RangeSeekBar.OnRangeSeekBarChangeListener<Integer>() {
        @Override
        public void onRangeSeekBarValuesChanged(RangeSeekBar<?> bar, Integer minValue, Integer maxValue) {

            Toast toast = Toast.makeText(getActivity(), String.valueOf("Min: "+bar.getSelectedMinValue()+"\nMax: "+
                    bar.getSelectedMaxValue()),Toast.LENGTH_SHORT);
            toast.setGravity(Gravity.CENTER|Gravity.BOTTOM,0,0);
            toast.show();
        }
    };
}
 

开发者ID:bounswe,
项目名称:bounswe2016group2,
代码行数:13,
代码来源:SettingsFragment.java

示例3: seekBarChnaged

点赞 2

import com.yahoo.mobile.client.android.util.rangeseekbar.RangeSeekBar; //导入依赖的package包/类
private RangeSeekBar.OnRangeSeekBarChangeListener<Integer> seekBarChnaged() {
    return new RangeSeekBar.OnRangeSeekBarChangeListener<Integer>() {
        @Override
        public void onRangeSeekBarValuesChanged(RangeSeekBar<?> bar, Integer minValue, Integer maxValue) {
            isSettingsChanged = true;
            Toast toast = Toast.makeText(getActivity(), String.valueOf("Min: "+bar.getSelectedMinValue()+"\nMax: "+
            bar.getSelectedMaxValue()),Toast.LENGTH_SHORT);
            toast.setGravity(Gravity.CENTER|Gravity.BOTTOM,0,0);
            toast.show();
        }
    };
}
 

开发者ID:bounswe,
项目名称:bounswe2016group2,
代码行数:13,
代码来源:FoodSearchFragment.java

示例4: getRangePair

点赞 2

import com.yahoo.mobile.client.android.util.rangeseekbar.RangeSeekBar; //导入依赖的package包/类
private <T extends Number> Pair<T, T> getRangePair(RangeSeekBar<T> aRangeBar)
{
    return new Pair<>(aRangeBar.getSelectedMinValue(), aRangeBar.getSelectedMaxValue());
}
 

开发者ID:ArcticWarriors,
项目名称:snobot-2017,
代码行数:5,
代码来源:SnobotVisionGLActivity.java

示例5: populateRangePair

点赞 2

import com.yahoo.mobile.client.android.util.rangeseekbar.RangeSeekBar; //导入依赖的package包/类
private <T extends Number> void populateRangePair(RangeSeekBar<T> aRangeBar, Pair<T, T> aThreshold)
{
    aRangeBar.setSelectedMinValue(aThreshold.first);
    aRangeBar.setSelectedMaxValue(aThreshold.second);
}
 

开发者ID:ArcticWarriors,
项目名称:snobot-2017,
代码行数:6,
代码来源:SnobotVisionGLActivity.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)