本文整理汇总了Java中com.socks.library.KLog.a方法的典型用法代码示例。如果您正苦于以下问题:Java KLog.a方法的具体用法?Java KLog.a怎么用?Java KLog.a使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.socks.library.KLog
的用法示例。
在下文中一共展示了KLog.a方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreateView
import com.socks.library.KLog; //导入方法依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
if (view == null) {
view = inflater.inflate(R.layout.fragment_recyclerview, container, false);
//获取索引值
Bundle bundle = getArguments();
if (bundle != null) {
mGanWuIndex = bundle.getInt(FRAGMENT_INDEX);
}
}
ButterKnife.bind(this, view);
mRealm = Realm.getDefaultInstance();
//因为共用一个Fragment视图,所以当前这个视图已被加载到Activity中,必须先清除后再加入Activity
ViewGroup parent = (ViewGroup) view.getParent();
if (parent != null) {
parent.removeView(view);
}
trySetupSwipeRefresh();
new Handler().postDelayed(() -> setRequestDataRefresh(true), 358);
KLog.a("load");
loadData(false);
initRecyclerView();
return view;
}
示例2: loadData
import com.socks.library.KLog; //导入方法依赖的package包/类
private void loadData(boolean clean) {
KLog.a(mDataManager);
subscription = mRealm
.where(Image.class)
.isNotNull("desc")
.findAllSortedAsync("publishedAt")
.asObservable()
.filter(image -> image.isLoaded())
.flatMap(image1 ->
mDataManager.getImageData(mPage)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread()))
.map(ImageToMeizhiMapper.getInstance())
.subscribeOn(AndroidSchedulers.mainThread())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(images3 -> {
if (clean) mMeizhisList.clear();
mGanWuAdapter.updateItems(images3,true);
setRequestDataRefresh(false);
mHasLoadedOnce = true;
}, throwable -> loadError(throwable));
}
示例3: loadData
import com.socks.library.KLog; //导入方法依赖的package包/类
private void loadData() {
KLog.a(mDataManager);
mSubscription = mDataManager.getGanWuData(mYear, mMonth, mDay)
.map(data -> data.results)
.map(this::addAllResults)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(list -> {
if (list.isEmpty()) {
showEmptyView();
} else {
mAdapter.notifyDataSetChanged();
}
setRequestDataRefresh(false);
mHasLoadedOnce = true;
}, throwable -> loadError(throwable));
}
示例4: onCreateView
import com.socks.library.KLog; //导入方法依赖的package包/类
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
if (view == null) {
view = inflater.inflate(R.layout.fragment_recyclerview, container, false);
//获取索引值
Bundle bundle = getArguments();
if (bundle != null) {
mGanWuType = bundle.getString(Constant.FRAGMENT_TYPE);
KLog.a(mGanWuType);
}
}
ButterKnife.bind(this, view);
mRealm = Realm.getDefaultInstance();
mNewsList = new ArrayList<>();
//因为共用一个Fragment视图,所以当前这个视图已被加载到Activity中,必须先清除后再加入Activity
ViewGroup parent = (ViewGroup) view.getParent();
if (parent != null) {
parent.removeView(view);
}
return view;
}
示例5: onCreate
import com.socks.library.KLog; //导入方法依赖的package包/类
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_web);
ButterKnife.bind(this);
mUrl = getIntent().getStringExtra(EXTRA_URL);
mTitle = getIntent().getStringExtra(EXTRA_TITLE);
initToolbar();
initSetting();
KLog.a(mUrl);
mWebView.loadUrl(mUrl);
KLog.a(mWebView);
mTvTitle.setFactory(() -> {
TextView textView = new TextView(this);
textView.setTextAppearance(this, R.style.WebTitle);
textView.setSingleLine(true);
textView.setEllipsize(TextUtils.TruncateAt.MARQUEE);
textView.postDelayed(() -> textView.setSelected(true), 1738);
return textView;
});
mTvTitle.setInAnimation(this, android.R.anim.fade_in);
mTvTitle.setOutAnimation(this, android.R.anim.fade_out);
if (mTitle != null) setTitle(mTitle);
}
示例6: initRecyclerView
import com.socks.library.KLog; //导入方法依赖的package包/类
private void initRecyclerView() {
KLog.a(mRecyclerView);
linearLayoutManager = new LinearLayoutManager(context());
mRecyclerView.setLayoutManager(linearLayoutManager);
mRecyclerView.setHasFixedSize(true);
mRecyclerView.setItemAnimator(new DefaultItemAnimator());
mRecyclerView.setAdapter(mGanWuAdapter);
mRecyclerView.addOnScrollListener(getOnBottomListener(linearLayoutManager));
mGanWuAdapter.setOnMeizhiTouchListener(getOnMeizhiTouchListener());
}
示例7: lazyLoad
import com.socks.library.KLog; //导入方法依赖的package包/类
@Override
protected void lazyLoad() {
if (!isPrepared || !isVisible || mHasLoadedOnce) {
return;
}
KLog.a("loadData");
loadData(false);
}
示例8: parseArguments
import com.socks.library.KLog; //导入方法依赖的package包/类
private void parseArguments() {
Bundle bundle = getArguments();
mYear = bundle.getInt(ARG_YEAR);
mMonth = bundle.getInt(ARG_MONTH);
mDay = bundle.getInt(ARG_DAY);
KLog.a(mYear +"/" +mMonth+"/"+ mDay);
}
示例9: onActivityCreated
import com.socks.library.KLog; //导入方法依赖的package包/类
@Override
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
trySetupSwipeRefresh();
new Handler().postDelayed(() -> setRequestDataRefresh(true), 358);
loadData(false);
KLog.a(mRecyclerView);
linearLayoutManager = new LinearLayoutManager(context());
mRecyclerView.setLayoutManager(linearLayoutManager);
mRecyclerView.setHasFixedSize(true);
mRecyclerView.setItemAnimator(new DefaultItemAnimator());
mGanWuListAdapter = new GanWuListAdapter(mNewsList, context());
mRecyclerView.setAdapter(mGanWuListAdapter);
}
示例10: getItem
import com.socks.library.KLog; //导入方法依赖的package包/类
@Override
public Fragment getItem(int position) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(mDate);
calendar.add(Calendar.DATE, -position);
KLog.a(calendar.get(Calendar.YEAR) +"/"+ calendar.get(Calendar.MONTH)+ "/" + calendar.get(Calendar.DAY_OF_MONTH));
return GanDailyFragment.newInstance(calendar.get(Calendar.YEAR),
calendar.get(Calendar.MONTH) + 1, calendar.get(Calendar.DAY_OF_MONTH));
}
示例11: newIntent
import com.socks.library.KLog; //导入方法依赖的package包/类
/**
* Using newIntent trick, return WebActivity Intent, to avoid `public static`
* constant
* variable everywhere
*
* @return Intent to start WebActivity
*/
public static Intent newIntent(Context context, String extraURL, String extraTitle) {
Intent intent = new Intent(context, WebActivity.class);
intent.putExtra(EXTRA_URL, extraURL);
intent.putExtra(EXTRA_TITLE, extraTitle);
KLog.a(extraURL + extraTitle);
return intent;
}
示例12: call
import com.socks.library.KLog; //导入方法依赖的package包/类
@Override
public List<Item> call(GanWuData ganWuData) {
KLog.a("inCall");
if (ganWuData.isError()) {
throw new ApiException(100);
}
List<News> ganwus = ganWuData.results.androidList;
List<News> images = ganWuData.results.妹纸List;
List<Item> items = new ArrayList<>(ganwus.size());
SimpleDateFormat inputFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SS'Z'");
SimpleDateFormat outputFormat = new SimpleDateFormat("yy/MM/dd HH:mm:ss");
for (News ganwu : ganwus) {
Item item = new Item();
for (News image : images){
item.setImageurl(image.getUrl());
}
try {
Date date = inputFormat.parse(ganwu.getCreatedAt());
item.date = outputFormat.format(date);
} catch (ParseException e) {
e.printStackTrace();
item.date = "unknown date";
}
item.setUrl(ganwu.getUrl());
item.setWho(ganwu.getWho());
item.setDescription(ganwu.getDesc());
items.add(item);
}
return items;
}
示例13: call
import com.socks.library.KLog; //导入方法依赖的package包/类
@Override
public List<Meizhi> call(ImageData imageData) {
KLog.a("inCall");
List<Image> images = imageData.results;
List<Meizhi> meizhis = new ArrayList<>(images.size());
for (Image image : images) {
Meizhi meizhi = new Meizhi(image.getPublishedAt(),image.getUrl(),image.getDesc());
meizhis.add(meizhi);
}
return meizhis;
}
示例14: loadData
import com.socks.library.KLog; //导入方法依赖的package包/类
private void loadData(boolean clean) {
KLog.a(mDataManager);
if (Objects.equals(mGanWuType, Constant.ANDROID)) {
subscription = mRealm
.where(News.class)
.findAllSortedAsync("publishedAt")
.asObservable()
.filter(newses -> newses.isLoaded())
.flatMap(newses1 ->
mDataManager.getRandomData(Constant.ANDROID, "20")
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread()))
.map(RandomDatatToItemsMapper.getInstance())
.subscribeOn(AndroidSchedulers.mainThread())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(newsess -> {
if (clean) mNewsList.clear();
mGanWuListAdapter.updateItems(newsess,true);
setRequestDataRefresh(false);
mHasLoadedOnce = true;
}, throwable -> loadError(throwable));
addSubscription(subscription);
} else {
subscription = mRealm
.where(News.class)
.findAllSortedAsync("publishedAt")
.asObservable()
.filter(newses -> newses.isLoaded())
.flatMap(newses1 ->
mDataManager.getRandomData(Constant.IOS, "20")
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread()))
.map(RandomDatatToItemsMapper.getInstance())
.subscribeOn(AndroidSchedulers.mainThread())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(newsess -> {
if (clean) mNewsList.clear();
mGanWuListAdapter.updateItems(newsess,true);
setRequestDataRefresh(false);
mHasLoadedOnce = true;
}, throwable -> loadError(throwable));
addSubscription(subscription);
}
}