use of android.widget.RadioGroup.OnCheckedChangeListener in project MagicCamera by wuhaoyu1990.
the class ImageEditBeautyView method onViewCreated.
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
mSkinSmoothView = (RelativeLayout) getView().findViewById(R.id.fragment_beauty_skin);
mSkinColorView = (RelativeLayout) getView().findViewById(R.id.fragment_beauty_color);
mRadioGroup = (RadioGroup) getView().findViewById(R.id.fragment_beauty_radiogroup);
mRadioGroup.setOnCheckedChangeListener(new OnCheckedChangeListener() {
@Override
public void onCheckedChanged(RadioGroup group, int checkedId) {
// TODO Auto-generated method stub
switch(checkedId) {
case R.id.fragment_beauty_btn_skinsmooth:
mSkinSmoothView.setVisibility(View.VISIBLE);
mSkinColorView.setVisibility(View.GONE);
break;
case R.id.fragment_beauty_btn_skincolor:
mSkinColorView.setVisibility(View.VISIBLE);
mSkinSmoothView.setVisibility(View.GONE);
break;
default:
break;
}
}
});
mMagicSDK = MagicSDK.getInstance();
mMagicSDK.setMagicSDKListener(mMagicSDKListener);
mSmoothBubbleSeekBar = (BubbleSeekBar) view.findViewById(R.id.fragment_beauty_skin_seekbar);
mSmoothBubbleSeekBar.setOnBubbleSeekBarChangeListener(mOnSmoothBubbleSeekBarChangeListener);
mWhiteBubbleSeekBar = (BubbleSeekBar) view.findViewById(R.id.fragment_beauty_white_seekbar);
mWhiteBubbleSeekBar.setOnBubbleSeekBarChangeListener(mOnColorBubbleSeekBarChangeListener);
init();
super.onViewCreated(view, savedInstanceState);
}
use of android.widget.RadioGroup.OnCheckedChangeListener in project MagicCamera by wuhaoyu1990.
the class ImageEditAdjustView method onViewCreated.
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
mRadioGroup = (RadioGroup) getView().findViewById(R.id.fragment_adjust_radiogroup);
mRadioGroup.setOnCheckedChangeListener(new OnCheckedChangeListener() {
@Override
public void onCheckedChanged(RadioGroup group, int checkedId) {
// TODO Auto-generated method stub
if (checkedId != -1)
mLinearLayout.setVisibility(View.VISIBLE);
switch(checkedId) {
case R.id.fragment_radio_contrast:
type = MagicFilterType.CONTRAST;
mSeekBar.reset();
mSeekBar.setSeekLength(-100, 100, -50, 1);
mSeekBar.setValue(contrast);
mLabel.setBackgroundResource(R.drawable.selector_image_edit_adjust_contrast);
break;
case R.id.fragment_radio_exposure:
type = MagicFilterType.EXPOSURE;
mSeekBar.reset();
mSeekBar.setSeekLength(-100, 100, 0, 1);
mSeekBar.setValue(exposure);
mLabel.setBackgroundResource(R.drawable.selector_image_edit_adjust_exposure);
break;
case R.id.fragment_radio_saturation:
type = MagicFilterType.SATURATION;
mSeekBar.reset();
mSeekBar.setSeekLength(-100, 100, 0, 1);
mSeekBar.setValue(saturation);
mLabel.setBackgroundResource(R.drawable.selector_image_edit_adjust_saturation);
break;
case R.id.fragment_radio_sharpness:
type = MagicFilterType.SHARPEN;
mSeekBar.reset();
mSeekBar.setSeekLength(-100, 100, 0, 1);
mSeekBar.setValue(sharpness);
mLabel.setBackgroundResource(R.drawable.selector_image_edit_adjust_saturation);
break;
case R.id.fragment_radio_bright:
type = MagicFilterType.BRIGHTNESS;
mSeekBar.reset();
mSeekBar.setSeekLength(-100, 100, 0, 1);
mSeekBar.setValue(brightness);
break;
case R.id.fragment_radio_hue:
type = MagicFilterType.HUE;
mSeekBar.reset();
mSeekBar.setSeekLength(0, 360, 0, 1);
mSeekBar.setValue(hue);
break;
default:
break;
}
}
});
mSeekBar = (TwoLineSeekBar) view.findViewById(R.id.item_seek_bar);
mSeekBar.setOnSeekChangeListener(mOnSeekChangeListener);
mVal = (TextView) view.findViewById(R.id.item_val);
mLabel = (ImageView) view.findViewById(R.id.item_label);
mLinearLayout = (LinearLayout) view.findViewById(R.id.seek_bar_item_menu);
MagicEngine.getInstance().setFilter(MagicFilterType.IMAGE_ADJUST);
}
use of android.widget.RadioGroup.OnCheckedChangeListener in project MagicCamera by wuhaoyu1990.
the class ImageEditBeautyView method onViewCreated.
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
mSkinSmoothView = (RelativeLayout) getView().findViewById(R.id.fragment_beauty_skin);
mSkinColorView = (RelativeLayout) getView().findViewById(R.id.fragment_beauty_color);
mRadioGroup = (RadioGroup) getView().findViewById(R.id.fragment_beauty_radiogroup);
mRadioGroup.setOnCheckedChangeListener(new OnCheckedChangeListener() {
@Override
public void onCheckedChanged(RadioGroup group, int checkedId) {
// TODO Auto-generated method stub
switch(checkedId) {
case R.id.fragment_beauty_btn_skinsmooth:
mSkinSmoothView.setVisibility(View.VISIBLE);
mSkinColorView.setVisibility(View.GONE);
break;
case R.id.fragment_beauty_btn_skincolor:
mSkinColorView.setVisibility(View.VISIBLE);
mSkinSmoothView.setVisibility(View.GONE);
break;
default:
break;
}
}
});
mSmoothBubbleSeekBar = (TwoLineSeekBar) view.findViewById(R.id.fragment_beauty_skin_seekbar);
mWhiteBubbleSeekBar = (TwoLineSeekBar) view.findViewById(R.id.fragment_beauty_white_seekbar);
init();
super.onViewCreated(view, savedInstanceState);
}
Aggregations