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


Java ApiConstants类代码示例

本文整理汇总了Java中com.github.obsessive.simplifyreader.api.ApiConstants的典型用法代码示例。如果您正苦于以下问题:Java ApiConstants类的具体用法?Java ApiConstants怎么用?Java ApiConstants使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ApiConstants类属于com.github.obsessive.simplifyreader.api包,在下文中一共展示了ApiConstants类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getVideosListUrl

import com.github.obsessive.simplifyreader.api.ApiConstants; //导入依赖的package包/类
public String getVideosListUrl(String category, int pageNum) {
    StringBuffer sb = new StringBuffer();
    sb.append(ApiConstants.Urls.YOUKU_VIDEOS_URLS);
    sb.append("?keyword=");
    try {
        sb.append(URLEncoder.encode(category, "UTF-8"));
    } catch (UnsupportedEncodingException e) {
        e.printStackTrace();
    }
    sb.append("&page=");
    sb.append(pageNum);
    sb.append("&count=");
    sb.append(PAGE_LIMIT);
    sb.append("&public_type=all&paid=0&period=today&orderby=published&client_id=6ecd6970268b4c53");
    return sb.toString().trim();
}
 
开发者ID:Dreamer206602,项目名称:SimplifyReader2,代码行数:17,代码来源:UriHelper.java

示例2: onFirstUserVisible

import com.github.obsessive.simplifyreader.api.ApiConstants; //导入依赖的package包/类
@Override
protected void onFirstUserVisible() {
    mCurrentPage = 0;
    mImagesListPresenter = new ImagesListPresenterImpl(mContext, this);

    if (NetUtils.isNetworkConnected(mContext)) {
        if (null != mSwipeRefreshLayout) {
            mSwipeRefreshLayout.postDelayed(new Runnable() {
                @Override
                public void run() {
                    mImagesListPresenter.loadListData(TAG_LOG, Constants.EVENT_REFRESH_DATA, mCurrentImagesCategory,
                            mCurrentPage, false);
                }
            }, ApiConstants.Integers.PAGE_LAZY_LOAD_DELAY_TIME_MS);
        }
    } else {
        toggleNetworkError(true, new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                mImagesListPresenter.loadListData(TAG_LOG, Constants.EVENT_REFRESH_DATA, mCurrentImagesCategory,
                        mCurrentPage, false);
            }
        });
    }
}
 
开发者ID:Dreamer206602,项目名称:SimplifyReader2,代码行数:26,代码来源:ImagesListFragment.java

示例3: onFirstUserVisible

import com.github.obsessive.simplifyreader.api.ApiConstants; //导入依赖的package包/类
@Override
protected void onFirstUserVisible() {
    mCurrentPage = 1;
    mVideosListPresenter = new VideosListPresenterImpl(mContext, this);

    if (NetUtils.isNetworkConnected(mContext)) {
        if (null != mSwipeRefreshLayout) {
            mSwipeRefreshLayout.postDelayed(new Runnable() {
                @Override
                public void run() {
                    mVideosListPresenter.loadListData(TAG_LOG, Constants.EVENT_REFRESH_DATA, mCurrentVideosCategory,
                            mCurrentPage, false);
                }
            }, ApiConstants.Integers.PAGE_LAZY_LOAD_DELAY_TIME_MS);
        }
    } else {
        toggleNetworkError(true, new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                mVideosListPresenter.loadListData(TAG_LOG, Constants.EVENT_REFRESH_DATA, mCurrentVideosCategory,
                        mCurrentPage, false);
            }
        });
    }
}
 
开发者ID:Dreamer206602,项目名称:SimplifyReader2,代码行数:26,代码来源:VideosListFragment.java

示例4: getVideoUserUrl

import com.github.obsessive.simplifyreader.api.ApiConstants; //导入依赖的package包/类
public String getVideoUserUrl(int userId) {
    StringBuffer sb = new StringBuffer();
    sb.append(ApiConstants.Urls.YOUKU_USER_URLS);
    sb.append("?user_id=");
    sb.append(userId);
    sb.append("&client_id=6ecd6970268b4c53");
    return sb.toString().trim();
}
 
开发者ID:Dreamer206602,项目名称:SimplifyReader2,代码行数:9,代码来源:UriHelper.java

示例5: getDoubanPlayListUrl

import com.github.obsessive.simplifyreader.api.ApiConstants; //导入依赖的package包/类
public String getDoubanPlayListUrl(String channelId) {
    StringBuffer sb = new StringBuffer();
    sb.append(ApiConstants.Urls.DOUBAN_PLAY_LIST_URLS);
    sb.append("?channel=");
    sb.append(channelId);
    sb.append("&app_name=radio_android&version=100&type=&sid=0");
    return sb.toString().trim();
}
 
开发者ID:Dreamer206602,项目名称:SimplifyReader2,代码行数:9,代码来源:UriHelper.java

示例6: onCreate

import com.github.obsessive.simplifyreader.api.ApiConstants; //导入依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();
    MobclickAgent.setDebugMode(true);
    MobclickAgent.updateOnlineConfig(this);
    MobclickAgent.openActivityDurationTrack(false);
    UmengUpdateAgent.update(this);

    VolleyHelper.getInstance().init(this);
    ImageLoader.getInstance().init(ImageLoaderHelper.getInstance(this).getImageLoaderConfiguration(ApiConstants.Paths.IMAGE_LOADER_CACHE_PATH));
}
 
开发者ID:Dreamer206602,项目名称:SimplifyReader2,代码行数:12,代码来源:SimplifyReaderApplication.java


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