创建fragment实例

来源:互联网 发布:淘宝退款可以申请几次 编辑:程序博客网 时间:2024/06/16 18:00
/** * MatchsFragment 实例 */public static MatchsFragment instance = null;/** * 单例模式 * @return */public static MatchsFragment getInstance() {    if (instance == null) {        instance = new MatchsFragment();    }    return instance;

}

/** * 调用 */

mFragments.add(MatchsFragment.getInstance());

原创粉丝点击