• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java KJLoger类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.kymjs.kjframe.utils.KJLoger的典型用法代码示例。如果您正苦于以下问题:Java KJLoger类的具体用法?Java KJLoger怎么用?Java KJLoger使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



KJLoger类属于org.kymjs.kjframe.utils包,在下文中一共展示了KJLoger类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: buildScaleDownAnimation

import org.kymjs.kjframe.utils.KJLoger; //导入依赖的package包/类
/**
 * 创建菜单退出的动画效果
 * 
 * @param target
 * @param targetScaleX
 * @param targetScaleY
 * @return
 */
private AnimatorSet buildScaleDownAnimation(View target,
        float targetScaleX, float targetScaleY) {
    KJLoger.debug("======buildScaleDownAnimation==298====");
    int pivotX = (int) (getScreenWidth() * 1.5);
    int pivotY = (int) (getScreenHeight() * 0.5);

    ViewHelper.setPivotX(target, pivotX);
    ViewHelper.setPivotY(target, pivotY);
    AnimatorSet scaleDown = new AnimatorSet();
    scaleDown.playTogether(
            ObjectAnimator.ofFloat(target, "scaleX", targetScaleX),
            ObjectAnimator.ofFloat(target, "scaleY", targetScaleY));

    scaleDown.setInterpolator(AnimationUtils.loadInterpolator(activity,
            android.R.anim.decelerate_interpolator));
    scaleDown.setDuration(250);
    return scaleDown;
}
 
开发者ID:KJFrame,项目名称:KJMusic,代码行数:27,代码来源:ResideMenu.java


示例2: checkVersion

import org.kymjs.kjframe.utils.KJLoger; //导入依赖的package包/类
/**
 * 检测更新
 * 
 * @param json
 */
public static String checkVersion(Context cxt, String json) {
    String url = "";
    try {
        JSONObject obj = new JSONObject(json);
        int serverVersion = obj.optInt("version", 0);
        int currentVersion = SystemTool.getAppVersionCode(cxt);
        KJLoger.debug("当前版本:" + currentVersion + "最新版本:" + serverVersion);
        if (serverVersion > currentVersion) {
            url = obj.optString("url");
        }
    } catch (JSONException e) {
        Log.e("kymjs", "getBlogList()解析异常");
    }
    return url;
}
 
开发者ID:KJFrame,项目名称:KJBlog,代码行数:21,代码来源:Parser.java


示例3: refresh

import org.kymjs.kjframe.utils.KJLoger; //导入依赖的package包/类
private void refresh() {
    kjh.get(EVERYDAY_HOST, new HttpCallBack() {
        @Override
        public void onSuccess(String t) {
            super.onSuccess(t);
            KJLoger.debug(TAG + "网络请求:" + t);
            if (t != null && !t.equals(cache)) {
                List<EverydayMessage> datas = Parser.getEveryDayMsg(t);
                if (adapter == null) {
                    adapter = new WeChatAdapter(outsideAty, datas);
                    mListView.setAdapter(adapter);
                } else {
                    adapter.refresh(datas);
                }
            }
        }
    });
}
 
开发者ID:KJFrame,项目名称:KJBlog,代码行数:19,代码来源:WeChatFragment.java


示例4: post

import org.kymjs.kjframe.utils.KJLoger; //导入依赖的package包/类
private void post() {
    KJHttp kjh = new KJHttp();
    HttpParams params = new HttpParams();
    // params.put("uid", 863548);
    // params.put("msg", "没有网,[发怒]");
    // params.putHeaders("cookie", "cookie不能告诉你");
    // kjh.post("http://www.oschina.net/action/api/tweet_pub", params,
    params.put("username", "[email protected]");
    params.put("pwd", "123456");
    kjh.post("http://www.oschina.net/action/api/login_validate", params,
            new HttpCallBack() {
                @Override
                public void onSuccess(Map<String, String> headers, byte[] t) {
                    super.onSuccess(headers, t);
                    // 获取cookie
                    KJLoger.debug("===" + headers.get("Set-Cookie"));
                    Log.i("kymjs", new String(t));
                }
            });
}
 
开发者ID:kymjs,项目名称:KJFrameForAndroid,代码行数:21,代码来源:HttpActivity.java


示例5: download

import org.kymjs.kjframe.utils.KJLoger; //导入依赖的package包/类
/**
 * 下载。有一个陷阱需要你注意:下载方法中的KJHttp对象必须和暂停方法中的KJHttp对象为同一个对象
 */
private void download() {
    kjh.download(
            FileUtils.getSDCardPath() + "/1.apk",
            "http://music.baidu.com/cms/mobile/static/apk/Baidumusic_yinyuehexzfc.apk",
            new HttpCallBack() {
                @Override
                public void onLoading(long count, long current) {
                    super.onLoading(count, current);
                    KJLoger.debug(count + "====" + current);
                }

                @Override
                public void onSuccess(byte[] t) {
                    super.onSuccess(t);
                    toast("完成");
                }

                @Override
                public void onFailure(int errorNo, String strMsg) {
                    super.onFailure(errorNo, strMsg);
                    KJLoger.debug(errorNo + "====" + strMsg);
                }
            });
}
 
开发者ID:kymjs,项目名称:KJFrameForAndroid,代码行数:28,代码来源:HttpActivity.java


示例6: checkVersion

import org.kymjs.kjframe.utils.KJLoger; //导入依赖的package包/类
/**
 * 检测更新
 *
 * @param json
 */
public static String checkVersion(Context cxt, String json) {
    String url = "";
    try {
        JSONObject obj = new JSONObject(json);
        int serverVersion = obj.optInt("version", 0);
        int currentVersion = SystemTool.getAppVersionCode(cxt);
        KJLoger.debug("当前版本:" + currentVersion + "最新版本:" + serverVersion);
        if (serverVersion > currentVersion) {
            url = obj.optString("url");
        }
    } catch (JSONException e) {
        Log.e("kymjs", "getBlogList()解析异常");
    }
    return url;
}
 
开发者ID:kymjs,项目名称:KJFrameForAndroid,代码行数:21,代码来源:Parser.java


示例7: dropDb

import org.kymjs.kjframe.utils.KJLoger; //导入依赖的package包/类
/**
 * 删除所有数据表
 */
public void dropDb() {
    Cursor cursor = db.rawQuery(
            "SELECT name FROM sqlite_master WHERE type ='table'", null);
    if (cursor != null) {
        while (cursor.moveToNext()) {
            // 添加异常捕获.忽略删除所有表时出现的异常:
            // table sqlite_sequence may not be dropped
            try {
                db.execSQL("DROP TABLE " + cursor.getString(0));
            } catch (SQLException e) {
                KJLoger.debug(getClass().getName() + e.getMessage());
            }
        }
    }
    if (cursor != null) {
        cursor.close();
        cursor = null;
    }
}
 
开发者ID:kymjs,项目名称:KJFrameForAndroid,代码行数:23,代码来源:KJDB.java


示例8: writeHeader

import org.kymjs.kjframe.utils.KJLoger; //导入依赖的package包/类
/**
 * Writes the contents of this CacheHeader to the specified
 * OutputStream.
 */
public boolean writeHeader(OutputStream os) {
    try {
        writeInt(os, CACHE_MAGIC);
        writeString(os, key);
        writeString(os, etag == null ? "" : etag);
        writeLong(os, serverDate);
        writeLong(os, ttl);
        writeLong(os, softTtl);
        writeStringStringMap(responseHeaders, os);
        os.flush();
        return true;
    } catch (IOException e) {
        KJLoger.debug("%s", e.toString());
        return false;
    }
}
 
开发者ID:kymjs,项目名称:KJFrameForAndroid,代码行数:21,代码来源:DiskCache.java


示例9: finish

import org.kymjs.kjframe.utils.KJLoger; //导入依赖的package包/类
/**
 * 将一个请求标记为已完成
 */
public void finish(Request<?> request) {
    synchronized (mCurrentRequests) {
        mCurrentRequests.remove(request);
    }

    if (request.shouldCache()) {
        synchronized (mWaitingRequests) {
            String cacheKey = request.getCacheKey();
            Queue<Request<?>> waitingRequests = mWaitingRequests.remove(cacheKey);
            if (waitingRequests != null) {
                if (HttpConfig.DEBUG) {
                    KJLoger.debug("Releasing %d waiting requests for cacheKey=%s.",
                            waitingRequests.size(), cacheKey);
                }
                mCacheQueue.addAll(waitingRequests);
            }
        }
    }
}
 
开发者ID:kymjs,项目名称:KJFrameForAndroid,代码行数:23,代码来源:KJHttp.java


示例10: ParserMusic

import org.kymjs.kjframe.utils.KJLoger; //导入依赖的package包/类
public static Music ParserMusic(Music music, String xml) {
    // music.setDecode("http://zhangmenshiting.baidu.com/data2/music/64380827/Z2ZmbGVuaW9fn6NndK6ap5WXcGZtbJxvaGlkZGaZaJpplmxnZmxpmmRrZmlpam5rZWWVmZaXa3CTZJeZmW1ncGVll1qin5t1YWBnbG1raHBlZmtmbGxvcTE$");
    // music.setEncode("64380827.mp3?xcode=286e777101c1b8d93162b3935447343beaa48b2ded70843d&mid=0.48851844827689");
    // music.setLrcid(14706 + "");
    try {
        String encode = null;
        String decode = null;
        String lrcid = null;
        int begin = 0, end = 0;

        // 偷个懒,不用xml解析
        begin = xml.indexOf("<encode>") + 8;
        end = xml.indexOf("</encode>");
        if (begin > 0 && end > begin) {
            encode = xml.substring(begin, end);
        }
        begin = xml.indexOf("<decode>") + 8;
        end = xml.indexOf("</decode>");
        if (begin > 0 && end > begin) {
            decode = xml.substring(begin, end);
        }
        begin = xml.indexOf("<lrcid>") + 7;
        end = xml.indexOf("</lrcid>");
        if (begin > 0 && end > begin) {
            lrcid = xml.substring(begin, end);
        }

        encode = encode.substring(9, encode.length() - 3);
        music.setEncode(encode);
        decode = decode.substring(9, decode.length() - 3);
        music.setDecode(decode);
        music.setLrcId(lrcid);
    } catch (Exception e) {
        KJLoger.debug("xml字串异常,无法解析");
        music.setLrcId("0000");
        return music;
    }
    return music;
}
 
开发者ID:KJFrame,项目名称:KJMusic,代码行数:40,代码来源:ParserMusicXML.java


示例11: downLrc

import org.kymjs.kjframe.utils.KJLoger; //导入依赖的package包/类
public void downLrc(Music music) {
    FileUtils fUtils = new FileUtils();
    File savePath = fUtils.getSavePath();
    if (music == null || music.getLrcUrl() == null
            || music.getLrcUrl().length() < 1) {
        KJLoger.debug(getClass() + "----歌曲下载失败,music对象有问题");
    } else if (savePath == null) {
        KJLoger.debug(getClass() + "----好像是没有存储卡");
    } else {
        File fileLrc = new File(savePath.toString() + "/"
                + music.getTitle() + ".lrc");
        if (!fileLrc.exists()) {
            try {
                fileLrc.createNewFile();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        KJHttp http = new KJHttp();
        File saveFile = new File(savePath.toString() + "/"
                + music.getTitle() + ".lrc");
        http.download(music.getLrcUrl(), saveFile, new HttpCallBack() {
            @Override
            public void onSuccess(File t) {
                super.onSuccess(t);
                KJLoger.debug(getClass() + "数据下载:---onSuccess-----"
                        + t.getAbsolutePath());
                Intent intent = new Intent(Config.RECEIVER_DOWNLOAD_LYRIC);
                sendBroadcast(intent);
            }
        });
    }
}
 
开发者ID:KJFrame,项目名称:KJMusic,代码行数:34,代码来源:DownMusicLrc.java


示例12: next

import org.kymjs.kjframe.utils.KJLoger; //导入依赖的package包/类
/**
 * 下一首
 * 
 * @return
 */
public Music next() {
    Music music = null;
    if (mPlayer.getPlaying() == Config.PLAYING_STOP
            || mPlayer.getList().isEmpty()) {
        play();
    } else {
        music = mPlayer.next(this);
        KJLoger.debug("正在播放:" + music.getTitle());
    }
    return music;
}
 
开发者ID:KJFrame,项目名称:KJMusic,代码行数:17,代码来源:PlayerService.java


示例13: previous

import org.kymjs.kjframe.utils.KJLoger; //导入依赖的package包/类
/**
 * 上一首
 * 
 * @return
 */
public Music previous() {
    Music music = null;
    if (mPlayer.getPlaying() == Config.PLAYING_STOP
            || mPlayer.getList().isEmpty()) {
        play();
    } else {
        music = mPlayer.previous(this);
        KJLoger.debug("正在播放:" + music.getTitle());
    }
    return music;
}
 
开发者ID:KJFrame,项目名称:KJMusic,代码行数:17,代码来源:PlayerService.java


示例14: changeMenuState

import org.kymjs.kjframe.utils.KJLoger; //导入依赖的package包/类
/**
 * 是否应该打开
 */
private void changeMenuState() {
    float y = yUp - yDown;
    KJLoger.debug("y=" + y + "-----yup=" + yUp + "-------yDown=" + yDown
            + "-----歌词界面状态" + ((Main) getActivity()).isOpen);
    if ((y > screenHeight / 2 && getScrollVelocity() > 0)
            || getScrollVelocity() > SNAP_VELOCITY) {
        // 关闭的(歌词界面正在呈现即将转入content界面)
        ((Main) getActivity()).isOpen = true;
    } else {
        // 打开的(内容界面正在呈现即将转入lyric界面)
        ((Main) getActivity()).isOpen = false;
    }
    ((Main) getActivity()).wantScroll((Main) getActivity());
}
 
开发者ID:KJFrame,项目名称:KJMusic,代码行数:18,代码来源:LyricFragment.java


示例15: showOpenMenuRelative

import org.kymjs.kjframe.utils.KJLoger; //导入依赖的package包/类
/**
 * 打开菜单相关的方法
 */
private void showOpenMenuRelative() {
    KJLoger.debug("========showOpenMenuRelative198=====");
    setViewPadding();
    scaleDown_activity.start();
    // remove self if has not remove
    if (getParent() != null)
        view_decor.removeView(this);
    if (sv_menu.getParent() != null)
        removeMenuLayout();
    view_decor.addView(this, 0);
    view_decor.addView(sv_menu);
}
 
开发者ID:KJFrame,项目名称:KJMusic,代码行数:16,代码来源:ResideMenu.java


示例16: buildScaleUpAnimation

import org.kymjs.kjframe.utils.KJLoger; //导入依赖的package包/类
/**
 * 创建菜单打开的动画效果
 * 
 * @param target
 * @param targetScaleX
 * @param targetScaleY
 * @return
 */
private AnimatorSet buildScaleUpAnimation(View target, float targetScaleX,
        float targetScaleY) {
    KJLoger.debug("=======buildScaleUpAnimation=============324");
    AnimatorSet scaleUp = new AnimatorSet();
    scaleUp.playTogether(
            ObjectAnimator.ofFloat(target, "scaleX", targetScaleX),
            ObjectAnimator.ofFloat(target, "scaleY", targetScaleY));
    scaleUp.setDuration(250);
    return scaleUp;
}
 
开发者ID:KJFrame,项目名称:KJMusic,代码行数:19,代码来源:ResideMenu.java


示例17: onCreate

import org.kymjs.kjframe.utils.KJLoger; //导入依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();
    KJLoger.openActivityState(true);
    KJLoger.openDebutLog(true);
    CrashHandler.create(this);
}
 
开发者ID:KJFrame,项目名称:KJMusic,代码行数:8,代码来源:AppContext.java


示例18: init

import org.kymjs.kjframe.utils.KJLoger; //导入依赖的package包/类
private void init() {
    // 初始化网络请求
    AsyncHttpClient client = new AsyncHttpClient();
    PersistentCookieStore myCookieStore = new PersistentCookieStore(this);
    client.setCookieStore(myCookieStore);
    ApiHttpClient.setHttpClient(client);
    ApiHttpClient.setCookie(ApiHttpClient.getCookie(this));

    // Log控制器
    KJLoger.openDebutLog(true);
    TLog.DEBUG = BuildConfig.DEBUG;

    // Bitmap缓存地址
    BitmapConfig.CACHEPATH = "OSChina/imagecache";
}
 
开发者ID:haiyangxue,项目名称:blogplu,代码行数:16,代码来源:AppContext.java


示例19: refresh

import org.kymjs.kjframe.utils.KJLoger; //导入依赖的package包/类
private void refresh(final int page) {
    kjh.get(OSCTWEET_HOST + page, new HttpCallBack() {
        @Override
        public void onSuccess(String t) {
            super.onSuccess(t);
            KJLoger.debug(TAG + "网络请求" + t);
            List<Tweet> datas = Parser.xmlToBean(TweetsList.class, t)
                    .getList();
            tweets.addAll(datas);
            if (adapter == null) {
                adapter = new TweetAdapter(mListView, tweets,
                        R.layout.item_list_tweet);
                mListView.setAdapter(adapter);
            } else {
                adapter.refresh(tweets);
            }
            mEmptyLayout.dismiss();
        }

        @Override
        public void onFailure(int errorNo, String strMsg) {
            super.onFailure(errorNo, strMsg);
            if (adapter != null && adapter.getCount() > 0) {
                return;
            } else {
                mEmptyLayout.setErrorType(EmptyLayout.NODATA);
            }
        }

        @Override
        public void onFinish() {
            super.onFinish();
            mRefreshLayout.onPullDownRefreshComplete();
            mRefreshLayout.onPullUpRefreshComplete();
        }
    });
}
 
开发者ID:KJFrame,项目名称:KJBlog,代码行数:38,代码来源:TweetFragment.java


示例20: handleSubmit

import org.kymjs.kjframe.utils.KJLoger; //导入依赖的package包/类
/**
 * 发布动弹
 */
private void handleSubmit(String strSpeech, File imageFile, String audioPath) {
    HttpConfig config = new HttpConfig();
    config.cacheTime = 0;
    KJHttp kjh = new KJHttp(config);
    HttpParams params = new HttpParams();
    params.putHeaders("cookie", UIHelper.getUser(outsideAty).getCookie());
    params.put("uid", UIHelper.getUser(outsideAty).getUid());
    params.put("msg", strSpeech + "          ——————我只是一条小尾巴");

    if (imageFile != null && imageFile.exists()) {
        params.put("img", imageFile);
    }
    if (!StringUtils.isEmpty(audioPath)) {
        params.put("amr", new File(audioPath));
    }
    kjh.post("http://www.oschina.net/action/api/tweet_pub", params,
            new HttpCallBack() {
                @Override
                public void onPreStar() {
                    super.onPreStar();
                    // 设置上传动画
                }

                @Override
                public void onSuccess(String t) {
                    super.onSuccess(t);
                    KJLoger.debug("发表动弹:" + t);
                    // 隐藏上传动画
                }

                @Override
                public void onFailure(int errorNo, String strMsg) {
                    super.onFailure(errorNo, strMsg);
                    // 设置上传动画失败图标
                }
            });
}
 
开发者ID:KJFrame,项目名称:KJBlog,代码行数:41,代码来源:TweetFragment.java



注:本文中的org.kymjs.kjframe.utils.KJLoger类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Query类代码示例发布时间:2022-05-22
下一篇:
Java ISO9075类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap