本文整理汇总了Java中com.rey.material.widget.Slider类的典型用法代码示例。如果您正苦于以下问题:Java Slider类的具体用法?Java Slider怎么用?Java Slider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Slider类属于com.rey.material.widget包,在下文中一共展示了Slider类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onClickChatLandScapeWidth
import com.rey.material.widget.Slider; //导入依赖的package包/类
public void onClickChatLandScapeWidth(View v) {
final int landscapeWidth = settings.getChatLandscapeWidth();
DialogService.getSliderDialog(
this,
new MaterialDialog.SingleButtonCallback() {
@Override
public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {
settings.setChatLandscapeWidth(landscapeWidth);
updateSummaries();
}
},
new Slider.OnPositionChangeListener() {
@Override
public void onPositionChanged(Slider view, boolean fromUser, float oldPos, float newPos, int oldValue, int newValue) {
settings.setChatLandscapeWidth(newValue);
updateSummaries();
}
},
landscapeWidth,
25,
60,
getString(R.string.chat_landscape_width_dialog)
).show();
}
示例2: onCreate
import com.rey.material.widget.Slider; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_shared_preference);
context = this;
btnColor = (Button) findViewById(R.id.btnColor);
txtHexadecimalColor = (EditText) findViewById(R.id.txtHexadecimalColor);
txtLineThickness = (EditText) findViewById(R.id.txtLineThickness);
txtTitleSelectPictureName = (EditText) findViewById(R.id.txtTitleSelectPictureName);
txtDirectoryName = (EditText) findViewById(R.id.txtDirectoryName);
txtPhotoName = (EditText) findViewById(R.id.txtPhotoName);
switchAutoIncrement = (Switch) findViewById(R.id.switchAutoIncrement);
sliderQuality = (Slider) findViewById(R.id.sliderQuality);
radioTypeExtension = (RadioGroup) findViewById(R.id.radioTypeExtension);
radioExtensionWEBP = (RadioButton) findViewById(R.id.radioExtensionWEBP);
radioExtensionPNG = (RadioButton) findViewById(R.id.radioExtensionPNG);
radioExtensionJPEG = (RadioButton) findViewById(R.id.radioExtensionJPEG);
noteFragment = (TextView) findViewById(R.id.noteFragment);
noteFragment.setVisibility(View.VISIBLE);
valuesSharedPreference();
listeners();
}
示例3: onActivityCreated
import com.rey.material.widget.Slider; //导入依赖的package包/类
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
mProgressBar = (ProgressBar) getView()
.findViewById(R.id.subject_grade_progress_bar_wrapper)
.findViewById(R.id.progress_bar);
mSubjectGradeWrapper = (LinearLayout) getView().findViewById(R.id.subject_grade_wrapper);
mSubjectStatus = (TextView) getView().findViewById(R.id.subject_status);
mSubjectRating = (TextView) getView().findViewById(R.id.subject_rating);
mSubjectComment = (TextView) getView().findViewById(R.id.subject_comment);
mSubjectStatusField = (RadioGroup) getView().findViewById(R.id.subject_status_field);
mSubjectRatingField = (Slider) getView().findViewById(R.id.subject_rating_field);
mSubjectCommentField = (MaterialEditText) getView().findViewById(R.id.subject_comment_field);
mSubjectStatusField.setOnCheckedChangeListener(this);
}
示例4: customCanScroll
import com.rey.material.widget.Slider; //导入依赖的package包/类
protected boolean customCanScroll(View v) {
if (v instanceof Slider || v instanceof Switch)
return true;
return false;
}