当前位置: 首页>>代码示例>>Java>>正文


Java KLog.a方法代码示例

本文整理汇总了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;
}
 
开发者ID:Dimon94,项目名称:GanWuMei,代码行数:26,代码来源:GanWuFragment.java

示例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));
}
 
开发者ID:Dimon94,项目名称:GanWuMei,代码行数:23,代码来源:GanWuFragment.java

示例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));
}
 
开发者ID:Dimon94,项目名称:GanWuMei,代码行数:18,代码来源:GanDailyFragment.java

示例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;
}
 
开发者ID:Dimon94,项目名称:GanWuMei,代码行数:24,代码来源:GanWuListFragment.java

示例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);
}
 
开发者ID:Dimon94,项目名称:GanWuMei,代码行数:26,代码来源:WebActivity.java

示例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());
}
 
开发者ID:Dimon94,项目名称:GanWuMei,代码行数:11,代码来源:GanWuFragment.java

示例7: lazyLoad

import com.socks.library.KLog; //导入方法依赖的package包/类
@Override
protected void lazyLoad() {
    if (!isPrepared || !isVisible || mHasLoadedOnce) {
        return;
    }
    KLog.a("loadData");
    loadData(false);
}
 
开发者ID:Dimon94,项目名称:GanWuMei,代码行数:9,代码来源:GanWuFragment.java

示例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);
}
 
开发者ID:Dimon94,项目名称:GanWuMei,代码行数:8,代码来源:GanDailyFragment.java

示例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);
}
 
开发者ID:Dimon94,项目名称:GanWuMei,代码行数:15,代码来源:GanWuListFragment.java

示例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));
}
 
开发者ID:Dimon94,项目名称:GanWuMei,代码行数:10,代码来源:GanDailyPagerAdapter.java

示例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;
}
 
开发者ID:Dimon94,项目名称:GanWuMei,代码行数:15,代码来源:WebActivity.java

示例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;
}
 
开发者ID:Dimon94,项目名称:GanWuMei,代码行数:32,代码来源:GanWuDataToItemsMapper.java

示例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;
}
 
开发者ID:Dimon94,项目名称:GanWuMei,代码行数:13,代码来源:ImageToMeizhiMapper.java

示例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);
    }
}
 
开发者ID:Dimon94,项目名称:GanWuMei,代码行数:45,代码来源:GanWuListFragment.java


注:本文中的com.socks.library.KLog.a方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。