示例#1
0
  public static EmoticonsKeyboardBuilder getSimpleBuilder(Context context) {

    DBHelper dbHelper = new DBHelper(context);
    //        ArrayList<EmoticonSetBean> mEmoticonSetBeanList =
    // dbHelper.queryEmoticonSet("emojimajor","xhs");
    ArrayList<EmoticonSetBean> mEmoticonSetBeanList =
        dbHelper.queryEmoticonSet(
            "a_emojimajor", "b_emojiother", "c_emojinature", "d_emojiculture", "e_emojicity");
    dbHelper.cleanup();

    ArrayList<AppBean> mAppBeanList = new ArrayList<AppBean>();
    String[] funcArray = context.getResources().getStringArray(com.keyboard.view.R.array.apps_func);
    String[] funcIconArray =
        context.getResources().getStringArray(com.keyboard.view.R.array.apps_func_icon);
    for (int i = 0; i < funcArray.length; i++) {
      AppBean bean = new AppBean();
      bean.setId(i);
      bean.setIcon(funcIconArray[i]);
      bean.setFuncName(funcArray[i]);
      mAppBeanList.add(bean);
    }

    return new EmoticonsKeyboardBuilder.Builder()
        .setEmoticonSetBeanList(mEmoticonSetBeanList)
        .build();
  }
示例#2
0
  public static EmoticonsKeyboardBuilder getBuilder(Context context) {

    DBHelper dbHelper = new DBHelper(context);
    ArrayList<EmoticonSetBean> mEmoticonSetBeanList = dbHelper.queryAllEmoticonSet();
    dbHelper.cleanup();

    ArrayList<AppBean> mAppBeanList = new ArrayList<AppBean>();
    String[] funcArray = context.getResources().getStringArray(com.keyboard.view.R.array.apps_func);
    String[] funcIconArray =
        context.getResources().getStringArray(com.keyboard.view.R.array.apps_func_icon);
    for (int i = 0; i < funcArray.length; i++) {
      AppBean bean = new AppBean();
      bean.setId(i);
      bean.setIcon(funcIconArray[i]);
      bean.setFuncName(funcArray[i]);
      mAppBeanList.add(bean);
    }

    return new EmoticonsKeyboardBuilder.Builder()
        .setEmoticonSetBeanList(mEmoticonSetBeanList)
        .build();
  }