本文整理汇总了Java中org.kymjs.kjframe.utils.KJLoger类的典型用法代码示例。如果您正苦于以下问题:Java KJLoger类的具体用法?Java KJLoger怎么用?Java KJLoger使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
KJLoger类属于org.kymjs.kjframe.utils包,在下文中一共展示了KJLoger类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例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;
}
示例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);
}
}
}
});
}
示例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));
}
});
}
示例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);
}
});
}
示例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;
}
示例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;
}
}
示例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;
}
}
示例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);
}
}
}
}
示例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;
}
示例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);
}
});
}
}
示例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;
}
示例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;
}
示例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());
}
示例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);
}