コード例 #1
0
ファイル: MainActivity.java プロジェクト: Festy/Singularity
  public void onKeyboardClick(int type, String msg) {
    Log.d("KeyBoard", msg);
    FragmentManager parent;

    ConversationFragment conversationFragment =
        (ConversationFragment)
            getSupportFragmentManager().findFragmentByTag("conversation_fragment");

    if (conversationFragment == null || !conversationFragment.isVisible()) {
      Log.e("Keyboard", "Fragment Null");
    } else {
      if (msg.equals("Enter")) conversationFragment.ListenFromKeyboard(1, msg);
      else conversationFragment.ListenFromKeyboard(0, msg);
    }
  }
コード例 #2
0
  private void sendComplete(Recipients recipients, long threadId, boolean refreshFragment) {
    attachmentManager.clear();
    composeText.setText("");

    this.recipients = recipients;
    this.threadId = threadId;

    ConversationFragment fragment =
        (ConversationFragment) getSupportFragmentManager().findFragmentById(R.id.fragment_content);
    if (refreshFragment) {
      fragment.reload(recipients, threadId);

      initializeTitleBar();
      initializeSecurity();
    }
    fragment.scrollToBottom();
  }
 @Override
 public Fragment getItem(int position) {
   switch (position) {
     case 0:
       return ConversationFragment.newInstance(groupId);
     case 1:
       return BallotFragment.newInstance(groupId);
     case 2:
       return GroupDetailFragment.newInstance(groupId);
   }
   return null;
 }