예제 #1
0
  private TransportOptions initializeTransportOptions(boolean media) {
    TransportOptions transportOptions = new TransportOptions(getContext(), media);
    transportOptions.addOnTransportChangedListener(this);

    setOnLongClickListener(this);

    return transportOptions;
  }
예제 #2
0
  @Override
  public boolean onLongClick(View v) {
    if (transportOptions.getEnabledTransports().size() > 1) {
      getTransportOptionsPopup().display(transportOptions.getEnabledTransports());
      return true;
    }

    return false;
  }
예제 #3
0
 @Override
 public void onSelected(TransportOption option) {
   transportOptions.setSelectedTransport(option.getType());
   getTransportOptionsPopup().dismiss();
 }
예제 #4
0
 public void setDefaultTransport(TransportOption.Type type) {
   transportOptions.setDefaultTransport(type);
 }
예제 #5
0
 public void disableTransport(TransportOption.Type type) {
   transportOptions.disableTransport(type);
 }
예제 #6
0
 public void resetAvailableTransports(boolean isMediaMessage) {
   transportOptions.reset(isMediaMessage);
 }
예제 #7
0
 public TransportOption getSelectedTransport() {
   return transportOptions.getSelectedTransport();
 }
예제 #8
0
 public void addOnTransportChangedListener(OnTransportChangedListener listener) {
   transportOptions.addOnTransportChangedListener(listener);
 }
예제 #9
0
 public boolean isManualSelection() {
   return transportOptions.isManualSelection();
 }