本文整理汇总了Java中org.kymjs.kjframe.KJBitmap类的典型用法代码示例。如果您正苦于以下问题:Java KJBitmap类的具体用法?Java KJBitmap怎么用?Java KJBitmap使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
KJBitmap类属于org.kymjs.kjframe包,在下文中一共展示了KJBitmap类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setNetBg
import org.kymjs.kjframe.KJBitmap; //导入依赖的package包/类
/**
* 为ImageView设置背景
*/
public static void setNetBg(final Context context, final ImageView iv,
String word, final int i) {
try {
word = "http://image.baidu.com/i?tn=baiduimagejson&ie=utf-8&ic=0&rn=20&pn="
+ 1 + "&word=" + URLEncoder.encode(word, "UTF-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
KJHttp kjh = new KJHttp();
kjh.get(word, new HttpCallBack() {
@Override
public void onSuccess(String t) {
super.onSuccess(t);
KJBitmap kjb = KJBitmap.create();
String u = ParserMusicXML.ParserMusicImg(context, t, i);
kjb.display(iv, u);
}
});
}
示例2: setUserInterface
import org.kymjs.kjframe.KJBitmap; //导入依赖的package包/类
/**
* 动态设置用户界面
*/
private void setUserInterface() {
String sdCardPath = FileUtils.getSavePath(AppConfig.saveFolder);
String headImgPath = sdCardPath
+ PreferenceHelper.readString(aty, TAG,
AppConfig.SPLASH_HEAD_IMG_KEY, "");
String rootBgPath = sdCardPath
+ PreferenceHelper.readString(aty, TAG,
AppConfig.SPLASH_BACKGROUND_KEY, "");
String boxBgPath = sdCardPath
+ PreferenceHelper.readString(aty, TAG,
AppConfig.SPLASH_BOX_KEY, "");
String contentStr = PreferenceHelper.readString(aty, TAG,
AppConfig.SPLASH_CONTENT_KEY,
getString(R.string.splash_content));
KJBitmap kjb = new KJBitmap();
kjb.display(mRlRoot, rootBgPath);
kjb.display(mImgHead, headImgPath);
kjb.display(mRlBox, boxBgPath);
mTvContent.setText(contentStr);
}
示例3: ChatAdapter
import org.kymjs.kjframe.KJBitmap; //导入依赖的package包/类
public ChatAdapter(Context cxt, List<AVIMMessage> datas, ChatActivity.OnChatItemClickListener listener) {
this.cxt = cxt;
if (datas == null) {
datas = new ArrayList<AVIMMessage>(0);
}
this.datas = datas;
kjb = new KJBitmap();
this.listener = listener;
}
示例4: ChatAdapter
import org.kymjs.kjframe.KJBitmap; //导入依赖的package包/类
public ChatAdapter(Context cxt, List<Message> datas, OnChatItemClickListener listener) {
this.cxt = cxt;
if (datas == null) {
datas = new ArrayList<Message>(0);
}
this.datas = datas;
kjb = new KJBitmap();
this.listener = listener;
}
示例5: clearAppCache
import org.kymjs.kjframe.KJBitmap; //导入依赖的package包/类
public void clearAppCache() {
DataCleanManager.cleanDatabases(this);
// clear data cache
DataCleanManager.cleanInternalCache(this);
DataCleanManager.cleanCustomCache(this.getExternalCacheDir());
// clear temporary content
Properties props = getProperties();
for (Object key : props.keySet()) {
String _key = key.toString();
if (_key.startsWith("temp"))
removeProperty(_key);
}
new KJBitmap().cleanCache();
}
示例6: LrcListAdapter
import org.kymjs.kjframe.KJBitmap; //导入依赖的package包/类
public LrcListAdapter(Context context) {
super();
kjb = KJBitmap.create();
this.context = context;
this.datas = Player.getPlayer().getList();
if (datas == null) {
datas = ListData.getCollectList(context);
if (datas == null) {
datas = new ArrayList<Music>();
}
}
}
示例7: onResume
import org.kymjs.kjframe.KJBitmap; //导入依赖的package包/类
@Override
public void onResume() {
super.onResume();
new KJBitmap().displayLoadAndErrorBitmap(mImgHead,
UIHelper.getUser(outsideAty).getPortrait(),
R.drawable.default_head, R.drawable.default_head);
mTvName.setText(UIHelper.getUser(outsideAty).getName());
}
示例8: display2
import org.kymjs.kjframe.KJBitmap; //导入依赖的package包/类
private void display2() {
KJBitmap kjb = new KJBitmap();
kjb.display(
mImg2,
"http://static.oschina.net/uploads/space/2015/0420/133006_NnLQ_12.jpg",
0, 0);
}
示例9: display3
import org.kymjs.kjframe.KJBitmap; //导入依赖的package包/类
private void display3() {
KJBitmap kjb = new KJBitmap();
kjb.display(
mImg3,
"http://static.oschina.net/uploads/space/2015/0420/133006_NnLQ_12.jpg",
new BitmapCallBack() {
@Override
public void onPreLoad() {
super.onPreLoad();
ViewInject.toast("即将开始下载");
}
@Override
public void onSuccess(Bitmap bitmap) {
super.onSuccess(bitmap);
ViewInject.toast("加载成功");
}
@Override
public void onFailure(Exception e) {
super.onFailure(e);
ViewInject.toast("加载失败");
}
@Override
public void onFinish() {
super.onFinish();
ViewInject.toast("加载完成");
}
});
}
示例10: MAdapter
import org.kymjs.kjframe.KJBitmap; //导入依赖的package包/类
public MAdapter(Context context, ArrayList<message> objects) {
super(context, 0, objects);
kjb = new KJBitmap();
}
示例11: initData
import org.kymjs.kjframe.KJBitmap; //导入依赖的package包/类
@Override
public void initData() {
super.initData();
url = getIntent().getStringExtra(URL_KEY);
kjb = new KJBitmap();
}
示例12: save
import org.kymjs.kjframe.KJBitmap; //导入依赖的package包/类
private void save() {
KJBitmap kjb = new KJBitmap();
kjb.saveImage(this, "http://www.kymjs.com/image/logo.png",
FileUtils.getSDCardPath() + "/OSL.png");
}
示例13: removeCache
import org.kymjs.kjframe.KJBitmap; //导入依赖的package包/类
private void removeCache() {
KJBitmap kjb = new KJBitmap();
kjb.removeCache("http://static.oschina.net/uploads/space/2015/0420/133006_NnLQ_12.jpg");
}
示例14: display1
import org.kymjs.kjframe.KJBitmap; //导入依赖的package包/类
private void display1() {
KJBitmap kjb = new KJBitmap();
kjb.display(mImg1,
"http://static.oschina.net/uploads/space/2015/0420/133006_NnLQ_12.jpg");
}
示例15: setImageByUrl
import org.kymjs.kjframe.KJBitmap; //导入依赖的package包/类
/**
* 为ImageView设置图片
*
* @param viewId
* @param url
* @return
*/
public AdapterHolder setImageByUrl(KJBitmap bitmap, int viewId, String url) {
bitmap.display(getView(viewId), url);
return this;
}