android.content.Intent.putCharSequenceArrayListExtra()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(2.9k)|赞(0)|评价(0)|浏览(222)

本文整理了Java中android.content.Intent.putCharSequenceArrayListExtra()方法的一些代码示例,展示了Intent.putCharSequenceArrayListExtra()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Intent.putCharSequenceArrayListExtra()方法的具体详情如下:
包路径:android.content.Intent
类名称:Intent
方法名:putCharSequenceArrayListExtra

Intent.putCharSequenceArrayListExtra介绍

暂无

代码示例

代码示例来源:origin: VictorChow/SmartGo

public BuildExtras putCharSequence(String name, ArrayList<CharSequence> value) {
  ((Intent) SmartPath.entity.intent).putCharSequenceArrayListExtra(name, value);
  return this;
}

代码示例来源:origin: stackoverflow.com

Intent intent = new Intent(this, DestActivity.class);
intent.putCharSequenceArrayListExtra("strings", myStringBuilders);
startActivity(intent);

代码示例来源:origin: hieuapp/android-firebase-chat

@Override
  public void onClick(View view) {
    ((ItemFriendViewHolder) holder).txtMessage.setTypeface(Typeface.DEFAULT);
    ((ItemFriendViewHolder) holder).txtName.setTypeface(Typeface.DEFAULT);
    Intent intent = new Intent(context, ChatActivity.class);
    intent.putExtra(StaticConfig.INTENT_KEY_CHAT_FRIEND, name);
    ArrayList<CharSequence> idFriend = new ArrayList<CharSequence>();
    idFriend.add(id);
    intent.putCharSequenceArrayListExtra(StaticConfig.INTENT_KEY_CHAT_ID, idFriend);
    intent.putExtra(StaticConfig.INTENT_KEY_CHAT_ROOM_ID, idRoom);
    ChatActivity.bitmapAvataFriend = new HashMap<>();
    if (!avata.equals(StaticConfig.STR_DEFAULT_BASE64)) {
      byte[] decodedString = Base64.decode(avata, Base64.DEFAULT);
      ChatActivity.bitmapAvataFriend.put(id, BitmapFactory.decodeByteArray(decodedString, 0, decodedString.length));
    } else {
      ChatActivity.bitmapAvataFriend.put(id, BitmapFactory.decodeResource(context.getResources(), R.drawable.default_avata));
    }
    mapMark.put(id, null);
    fragment.startActivityForResult(intent, FriendsFragment.ACTION_START_CHAT);
  }
});

代码示例来源:origin: hieuapp/android-firebase-chat

@Override
  public void onClick(View view) {
    if(listFriend == null){
      listFriend = FriendDB.getInstance(context).getListFriend();
    }
    Intent intent = new Intent(context, ChatActivity.class);
    intent.putExtra(StaticConfig.INTENT_KEY_CHAT_FRIEND, groupName);
    ArrayList<CharSequence> idFriend = new ArrayList<>();
    ChatActivity.bitmapAvataFriend = new HashMap<>();
    for(String id : listGroup.get(position).member) {
      idFriend.add(id);
      String avata = listFriend.getAvataById(id);
      if(!avata.equals(StaticConfig.STR_DEFAULT_BASE64)) {
        byte[] decodedString = Base64.decode(avata, Base64.DEFAULT);
        ChatActivity.bitmapAvataFriend.put(id, BitmapFactory.decodeByteArray(decodedString, 0, decodedString.length));
      }else if(avata.equals(StaticConfig.STR_DEFAULT_BASE64)) {
        ChatActivity.bitmapAvataFriend.put(id, BitmapFactory.decodeResource(context.getResources(), R.drawable.default_avata));
      }else {
        ChatActivity.bitmapAvataFriend.put(id, null);
      }
    }
    intent.putCharSequenceArrayListExtra(StaticConfig.INTENT_KEY_CHAT_ID, idFriend);
    intent.putExtra(StaticConfig.INTENT_KEY_CHAT_ROOM_ID, listGroup.get(position).id);
    context.startActivity(intent);
  }
});

相关文章

Intent类方法