本文整理了Java中android.widget.SeekBar.getParent()
方法的一些代码示例,展示了SeekBar.getParent()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SeekBar.getParent()
方法的具体详情如下:
包路径:android.widget.SeekBar
类名称:SeekBar
方法名:getParent
暂无
代码示例来源:origin: palaima/DebugDrawer
@Override
public boolean onTouch(View v, MotionEvent event) {
errorSeekBar.getParent().requestDisallowInterceptTouchEvent(true);
return false;
}
});
代码示例来源:origin: palaima/DebugDrawer
@Override
public boolean onTouch(View v, MotionEvent event) {
delaySeekBar.getParent().requestDisallowInterceptTouchEvent(true);
return false;
}
});
代码示例来源:origin: klinker24/Android-Blur-Launcher
@Override
public void onBindView(View view) {
super.onBindView(view);
try {
// move our seekbar to the new view we've been given
ViewParent oldContainer = mSeekBar.getParent();
ViewGroup newContainer = (ViewGroup) view.findViewById(R.id.seekBarPrefBarContainer);
if (oldContainer != newContainer) {
// remove the seekbar from the old view
if (oldContainer != null) {
((ViewGroup) oldContainer).removeView(mSeekBar);
}
// remove the existing seekbar (there may not be one) and add ours
newContainer.removeAllViews();
newContainer.addView(mSeekBar, ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT);
}
} catch (Exception ex) {
Log.e(TAG, "Error binding view: " + ex.toString());
}
updateView(view);
}
代码示例来源:origin: vocollapse/Blockinger
@SuppressWarnings("deprecation")
@Override
public void onBindView(View view) {
super.onBindView(view);
try
{
// move our seekbar to the new view we've been given
ViewParent oldContainer = mSeekBar.getParent();
ViewGroup newContainer = (ViewGroup) view.findViewById(R.id.seekBarPrefBarContainer);
if (oldContainer != newContainer) {
// remove the seekbar from the old view
if (oldContainer != null) {
((ViewGroup) oldContainer).removeView(mSeekBar);
}
// remove the existing seekbar (there may not be one) and add ours
newContainer.removeAllViews();
newContainer.addView(mSeekBar, ViewGroup.LayoutParams.FILL_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT);
}
}
catch(Exception ex) {
Log.e(TAG, "Error binding view: " + ex.toString());
}
updateView(view);
}
代码示例来源:origin: grzegorznittner/chanu
@SuppressWarnings("deprecation")
@Override
public void onBindView(View view) {
super.onBindView(view);
try {
// move our seekbar to the new view we've been given
ViewParent oldContainer = seekBar.getParent();
ViewGroup newContainer = (ViewGroup) view
.findViewById(R.id.seekBarPrefBarContainer);
if (oldContainer != newContainer) {
// remove the seekbar from the old view
if (oldContainer != null) {
((ViewGroup) oldContainer).removeView(seekBar);
}
// remove the existing seekbar (there may not be one) and add
// ours
newContainer.removeAllViews();
newContainer.addView(seekBar,
ViewGroup.LayoutParams.FILL_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT);
}
} catch (Exception ex) {
Log.e(TAG, "Error binding view: " + ex.toString(), ex);
}
updateView(view);
}
代码示例来源:origin: ogarcia/opensudoku
@Override
protected void onBindDialogView(View view) {
super.onBindDialogView(view);
mValueLabel = (TextView) view.findViewById(R.id.value);
SeekBar seekBar = mSeekBar;
seekBar.setProgress(getValue() - mMin);
updateValueLabel(seekBar.getProgress());
ViewParent oldParent = seekBar.getParent();
if (oldParent != view) {
if (oldParent != null) {
((ViewGroup) oldParent).removeView(seekBar);
}
onAddSeekBarToDialogView(view, seekBar);
}
}
代码示例来源:origin: powerpoint45/Lucid-Browser
ViewParent oldContainer = mSeekBar.getParent();
ViewGroup newContainer = (ViewGroup) view.findViewById(R.id.seekBarPrefBarContainer);
代码示例来源:origin: AEFeinstein/mtg-familiar
@Override
public void onBindView(@NotNull View view) {
super.onBindView(view);
try {
// move our seekbar to the new view we've been given
ViewParent oldContainer = mSeekBar.getParent();
ViewGroup newContainer = (ViewGroup) view.findViewById(R.id.seekBarPrefBarContainer);
if (oldContainer != newContainer) {
// remove the seekbar from the old view
if (oldContainer != null) {
((ViewGroup) oldContainer).removeView(mSeekBar);
}
// remove the existing seekbar (there may not be one) and add ours
newContainer.removeAllViews();
newContainer.addView(mSeekBar, ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT);
}
} catch (Exception ex) {
/* Eat it */
}
//if dependency is false from the beginning, disable the seek bar
if (!view.isEnabled()) {
mSeekBar.setEnabled(false);
}
updateView(view);
}
内容来源于网络,如有侵权,请联系作者删除!