本文整理汇总了Java中com.socks.library.KLog.d方法的典型用法代码示例。如果您正苦于以下问题:Java KLog.d方法的具体用法?Java KLog.d怎么用?Java KLog.d使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.socks.library.KLog
的用法示例。
在下文中一共展示了KLog.d方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: validate
import com.socks.library.KLog; //导入方法依赖的package包/类
private boolean validate() {
KLog.d("Login....");
boolean valid = true;
String email = _emailText.getText().toString();
String password = _passwordText.getText().toString();
//这是一个正则表达式
if (email.isEmpty() || !Patterns.EMAIL_ADDRESS.matcher(email).matches()) {
_emailText.setError("enter a valid email address");
valid = false;
} else {
_emailText.setError(null);
}
if (password.isEmpty() || password.length() < 6) {
_passwordText.setError("the password length must be greater than six");
valid = false;
} else {
_passwordText.setError(null);
}
return valid;
}
示例2: searchCommodity
import com.socks.library.KLog; //导入方法依赖的package包/类
private void searchCommodity() {
((InputMethodManager) context.getSystemService(
Context.INPUT_METHOD_SERVICE)).hideSoftInputFromWindow(searchEdittext.getWindowToken(),
InputMethodManager.HIDE_NOT_ALWAYS);
String msg = searchEdittext.getText().toString().trim();
if (msg.equals("")) {
toastUtil.show("请输入要搜索的商品");
return;
}
BmobQuery<Commodity> bmobQuery = new BmobQuery<>();
bmobQuery.addWhereEqualTo("categorySub", msg);
KLog.d(msg);
bmobQuery.findObjects(new FindListener<Commodity>() {
@Override public void done(List<Commodity> list, BmobException e) {
if (e != null) {
KLog.d(e.getMessage());
}
if (list != null) {
KLog.d(list.size());
}
}
});
}
示例3: insertOrIncrease
import com.socks.library.KLog; //导入方法依赖的package包/类
/**
* 在[本地数据库]购物车中插入商品或增加其数量
*
* @param c 商品bean
*/
public static void insertOrIncrease(Commodity c) {
CommodityLocalDao commodityLocalDao = GreenDaoKyHelper.getDaoSession().getCommodityLocalDao();
QueryBuilder<CommodityLocal> queryBuilder = commodityLocalDao.queryBuilder();
queryBuilder.where(CommodityLocalDao.Properties.ObjectId.eq(c.getObjectId()));
List<CommodityLocal> localList = queryBuilder.list();
KLog.d("查询到的结果数:" + localList.size());
CommodityLocal commodityLocal =
new CommodityLocal(null, c.getObjectId(), c.getCategory(), c.getName(), c.getDetails(), 1,
c.getPrice(), c.getCoverPhotoUrl(), false);
if (localList.size() >= 1) {
commodityLocal.setId(localList.get(0).getId());
commodityLocal.setCartCount(localList.get(0).getCartCount() + 1);
commodityLocalDao.update(commodityLocal);
} else {
commodityLocalDao.insert(commodityLocal);
}
}
示例4: startFictionContents
import com.socks.library.KLog; //导入方法依赖的package包/类
private void startFictionContents(FictionModel fictionModel) {
String detailUrl = fictionModel.detailUrl;
if (TextUtils.isEmpty(detailUrl)) {
KLog.d();
UIUtils.snackBar(coordinatorLayout, R.string.pt_list_content_error);
return;
}
String bookinfo = detailUrl.replaceAll(".html", "/index.html").replaceAll("bookinfo", "html");
if (TextUtils.isEmpty(bookinfo)) {
KLog.d();
UIUtils.snackBar(coordinatorLayout, R.string.pt_list_content_error);
return;
}
FictionContentsActivity.getInstance(ApiConfig.Type.PIAO_TIAN, bookinfo, fictionModel.title);
}
示例5: deletePlaceholder
import com.socks.library.KLog; //导入方法依赖的package包/类
/**
* Delete all placeholders
*/
private void deletePlaceholder() {
if (mAdapter != null && mAdapter.contains(placeHolderCell)) {
KLog.d("deletePlaceholder", "done");
//removing directly to the adapter list to avoid firing callbacks
mAdapter.items.remove(mAdapter.getItemCount() - 1);
}
}
示例6: signUp
import com.socks.library.KLog; //导入方法依赖的package包/类
@OnClick(R.id.btn_signup)
public void signUp() {
KLog.d("signUp");
if (!validate()) {
onSignupFailed();
return;
}
_signUpButton.setEnabled(false);
final ProgressDialog progressDialog = new ProgressDialog(SignupActivity.this,
R.style.AppTheme_Dark_Dialog);
progressDialog.setIndeterminate(true);
progressDialog.setMessage("Creating Account...");
progressDialog.show();
String name = _nameText.getText().toString();
String email = _emailText.getText().toString();
String password = _passwordText.getText().toString();
// TODO: Implement your own signup logic here.
new android.os.Handler().postDelayed(
new Runnable() {
public void run() {
// On complete call either onSignupSuccess or onSignupFailed
// depending on success
onSignupSuccess();
// onSignupFailed();
progressDialog.dismiss();
}
}, 3000);
}
示例7: intercept
import com.socks.library.KLog; //导入方法依赖的package包/类
@Override
public Response intercept(Chain chain) throws IOException {
Response response = chain.proceed(chain.request());
String a = response.header("Set-Cookie");
if (a == null) {
KLog.d("----lin----> 他没有cookie");
} else {
String b = a.split(";")[0];
KLog.d("-----lin----> 登陆成功+他有cookie" + a);
Shared.saveCookie(b);
}
return response;
}
示例8: initListener
import com.socks.library.KLog; //导入方法依赖的package包/类
private void initListener() {
listener2 = new HttpResultListener<List<FamousPageModel>>() {
@Override
public void onSuccess(List<FamousPageModel> list) {
// if (list.size() != 0) {
//
// }
// mlist = list;
KLog.d("-----lin-----" + list.get(0).getName());
refreshLayout.setRefreshing(false);
if (isLoadMore) {
KLog.i("----0----0>" + isLoadMore);
mlist.addAll(list);
madapter.refreshList(mlist);
madapter.notifyDataSetChanged();
madapter.showNoMore();
} else {
KLog.i("----0----1>" + isLoadMore);
if (list.size() != 0)
mlist = list;
madapter.refreshList(mlist);
madapter.notifyDataSetChanged();
}
KLog.i("----0----3>" + mlist.size());
}
@Override
public void onError(Throwable e) {
Log.i("lin", "----lin----> refresh error " + e.toString());
refreshLayout.setRefreshing(false);
madapter.showNoMore();
}
};
}
示例9: onGank
import com.socks.library.KLog; //导入方法依赖的package包/类
@OnClick(R.id.card_view)
void onGank(View v) {
News news = mGanList.get(getLayoutPosition());
Intent intent = WebActivity.newIntent(v.getContext(), news.getUrl(), news.getDesc());
KLog.d(intent);
v.getContext().startActivity(intent);
}
示例10: CartRecyclerAdapter
import com.socks.library.KLog; //导入方法依赖的package包/类
/**
* 初始化 RecyclerView 适配器
*
* @param mDatas 绑定的数据
*/
public CartRecyclerAdapter(List<CommodityLocal> mDatas) {
super(mDatas, R.layout.recycler_cartfragment_show);
listener = new KyRecyclerViewItemOnClickListener<CommodityLocal>() {
@Override public void Onclick(View v, int adapterPosition, CommodityLocal data) {
KLog.d("点击:" + data.getName() + "位置:" + adapterPosition);
}
};
}
示例11: initData
import com.socks.library.KLog; //导入方法依赖的package包/类
@Override
protected void initData() {
mPresenter.setNewsTypeAndId(mNewsChannelType, mNewsChannelId);
KLog.d(TAG,"initPresenter - mNewsChannelIndex = "+ mNewsChannelIndex);
if(getUserVisibleHint()){
KLog.d(TAG,"initPresenter - mNewsChannelIndex = "+ mNewsChannelIndex + " -- onCreate");
mPresenter.onCreate();
}
}
示例12: OnItemClickListener
import com.socks.library.KLog; //导入方法依赖的package包/类
@Override
public void OnItemClickListener(View view, int position) {
List<NewsSummary> mNewsSummaryList = mAdapter.getList();
NewsSummary newsSummary = mNewsSummaryList.get(position);
if(NewsListAdapter.TYPE_PHOTO_SET == mAdapter.getItemViewType(position)){
NewsPhotoDetail mNewsPhotoDetail = setNewsPhotoDetail(newsSummary);
startActivity(NewsPhotoDetailActivity.getNewsDetailIntent(getActivity(),mNewsPhotoDetail));
KLog.d(TAG,"postId = " + newsSummary.getPostid() +"--- postSetId= "+ newsSummary.getPhotosetID());
}else{
Intent intent = NewsDetailActivity.getNewsDetailIntent(getActivity(),newsSummary.getPostid(),newsSummary.getImgsrc());
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
ImageView animationIv = (ImageView) view.findViewById(R.id.news_picture_iv);
ActivityOptions options = ActivityOptions.makeSceneTransitionAnimation(
getActivity(),
animationIv,
Constants.TRANSITION_ANIMATION_NEWS_PHOTOS);
startActivity(intent,options.toBundle());
}else{
ActivityOptionsCompat optionsCompat = ActivityOptionsCompat.makeScaleUpAnimation(
view,
view.getWidth() / 2,
view.getHeight() / 2,
0,
0);
ActivityCompat.startActivity(getActivity(),intent,optionsCompat.toBundle());
}
}
}
示例13: onDestroy
import com.socks.library.KLog; //导入方法依赖的package包/类
@Override
public void onDestroy() {
super.onDestroy();
if(mIsChannelChanged || selectChannelName != null) {
//TODO 当我的频道改变时,就通知新闻列表改变
KLog.d("NewsChannelPresenterImpl","mine channel has changed");
RxBus.getInstance().post(new ChannelChangeEvent(selectChannelName,mIsChannelChanged));
}
}
示例14: onCreate
import com.socks.library.KLog; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
KLog.d("NewsListFragment","NewsListPresenterImpl");
if(mView != null){
firstLoadData();
}
}
示例15: loadNewsChannels
import com.socks.library.KLog; //导入方法依赖的package包/类
public List<NewsChannelTable> loadNewsChannels(String isSelect){
List<NewsChannelTable> list = new ArrayList<>();
db.beginTransaction();
Cursor cursor = null;
try{
cursor = db.query(DBHelper.TABLE_NEWS_CHANNEL,null,"news_channel_select = ? ",new String[]{isSelect},null,null,"news_channel_index asc");
if(cursor.moveToFirst()) {
while (!cursor.isAfterLast()) {
String channelName = cursor.getString(cursor.getColumnIndex("news_channel_name"));
String channelId = cursor.getString(cursor.getColumnIndex("news_channel_id"));
String channelType = cursor.getString(cursor.getColumnIndex("news_channel_type"));
boolean channelSelect = cursor.getInt(cursor.getColumnIndex("news_channel_select")) == 1;
int channelIndex = cursor.getInt(cursor.getColumnIndex("news_channel_index"));
boolean channelFixed = cursor.getInt(cursor.getColumnIndex("news_channel_fixed")) == 1;
NewsChannelTable channelTable = new NewsChannelTable(channelName,channelId,channelType,channelSelect,channelIndex,channelFixed);
KLog.d("FIND--","loadNewsChannels--"+channelTable.toString());
list.add(channelTable);
cursor.moveToNext();
}
}
db.setTransactionSuccessful();
}catch (Exception e){
/**
* exception log
*/
KLog.e(e.getMessage());
}finally {
if(cursor != null){
cursor.close();
}
db.endTransaction();
}
return list;
}