use of com.voipgrid.vialer.dialer.KeyPadView in project vialer-android by VoIPGRID.
the class CallTransferFragment method onViewCreated.
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
TextView callTransferOnHoldNumberTextView = ((TextView) view.findViewById(R.id.call_transfer_number));
if (!TextUtils.isEmpty(mOriginalCallerId)) {
callTransferOnHoldNumberTextView.setText(mOriginalCallerId);
} else {
callTransferOnHoldNumberTextView.setText(mOriginalCallerPhoneNumber);
}
ViewGroup keyPadViewContainer = (ViewGroup) view.findViewById(R.id.fragment_call_transfer);
KeyPadView keyPadView = (KeyPadView) keyPadViewContainer.findViewById(R.id.key_pad_view);
keyPadView.setOnKeyPadClickListener(this);
mNumberInputView = (NumberInputView) view.findViewById(R.id.number_input_edit_text);
mNumberInputView.setOnInputChangedListener(new NumberInputView.OnInputChangedListener() {
@Override
public void onInputChanged(String number) {
// This is needed to get the remove button to show up.
}
});
View makeTransferCall = view.findViewById(R.id.button_call);
makeTransferCall.setOnClickListener(this);
View hangupButton = view.findViewById(R.id.button_transfer_hangup);
hangupButton.setOnClickListener(this);
mCallTransferKeyPadView = view.findViewById(R.id.call_transfer_key_pad);
mCallTransferButtonsContainer = view.findViewById(R.id.call_transfer_buttons);
mTransferCallButton = view.findViewById(R.id.button_transfer_call);
mTransferCallButton.setOnClickListener(this);
if (mSecondCallConnected) {
mCallTransferKeyPadView.setVisibility(View.GONE);
mCallTransferButtonsContainer.setVisibility(View.VISIBLE);
} else {
mTransferCallButton.setActivated(false);
mTransferCallButton.setAlpha(0.5f);
}
}
use of com.voipgrid.vialer.dialer.KeyPadView in project vialer-android by VoIPGRID.
the class CallKeyPadFragment method onViewCreated.
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
ViewGroup keyPadViewContainer = (ViewGroup) view.findViewById(R.id.fragment_call_key_pad);
KeyPadView keyPadView = (KeyPadView) keyPadViewContainer.findViewById(R.id.key_pad_view);
keyPadView.setOnKeyPadClickListener(this);
mHangupButton = view.findViewById(R.id.button_keypad_call_hangup);
mHangupButton.setOnClickListener(this);
mNumberInputView = (NumberInputView) view.findViewById(R.id.number_input_edit_text);
mNumberInputView.setOnInputChangedListener(new NumberInputView.OnInputChangedListener() {
@Override
public void onInputChanged(String number) {
// This is needed to get the remove button to show up.
}
});
AudioManager audioManager = (AudioManager) getActivity().getSystemService(Context.AUDIO_SERVICE);
mToneGenerator = new ToneGenerator(AudioManager.STREAM_DTMF, (int) (Math.floor(audioManager.getStreamVolume(AudioManager.STREAM_DTMF) * 5)));
}
Aggregations