當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。