use of com.codetroopers.betterpickers.hmspicker.HmsPickerBuilder in project android-betterpickers by code-troopers.
the class SampleHmsNegativeDurationUsage method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.text_and_button);
mResultTextView = (TextView) findViewById(R.id.text);
Button button = (Button) findViewById(R.id.button);
mResultTextView.setText(R.string.no_value);
button.setText(R.string.hms_picker_set);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
HmsPickerBuilder hpb = new HmsPickerBuilder().setPlusMinusVisibility(View.VISIBLE).setFragmentManager(getSupportFragmentManager()).setStyleResId(R.style.BetterPickersDialogFragment);
hpb.show();
}
});
}
use of com.codetroopers.betterpickers.hmspicker.HmsPickerBuilder in project android-betterpickers by code-troopers.
the class SampleHmsFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.text_and_button, container, false);
mResultTextView = (TextView) view.findViewById(R.id.text);
Button button = (Button) view.findViewById(R.id.button);
mResultTextView.setText(R.string.no_value);
button.setText(R.string.hms_picker_set);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
HmsPickerBuilder hpb = new HmsPickerBuilder().setFragmentManager(getChildFragmentManager()).setStyleResId(R.style.BetterPickersDialogFragment).setTargetFragment(SampleHmsFragment.this);
hpb.show();
}
});
return view;
}
Aggregations