• 大小: 5.01MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-09-19
  • 语言: Java
  • 标签: android  

资源简介

android实现仿今日头条,可以运行。

资源截图

代码片段和文件信息

package me.weyye.todaynews.base;

import java.util.List;

import me.weyye.todaynews.model.CommentList;
import me.weyye.todaynews.model.News;
import me.weyye.todaynews.model.NewsDetail;
import me.weyye.todaynews.model.VideoModel;
import okhttp3.ResponseBody;
import retrofit2.http.GET;
import retrofit2.http.Query;
import retrofit2.http.Url;
import rx.Observable;

/**
 *
 */
public interface ApiService {
    //baseUrl
//    String API_SERVER_URL = “http://192.168.0.116:88/“;
    String HOST = “http://www.toutiao.com/“;
    String API_SERVER_URL = HOST + “api/“;

    String URL_ARTICLE_FEED = “/api/article/recent/“;
    String URL_COMMENT_LIST = “comment/list/“;
    String HOST_VIDEO = “http://i.snssdk.com“;
    String URL_VIDEO = “/video/urls/v/1/toutiao/mp4/%s?r=%s“;


    /**
     * 获取新闻数据列表
     */
    @GET(URL_ARTICLE_FEED + “?source=2&as=A1C528E25E76FB8&cp=582EC64FEBD84E1“)
    Observable>> getNews(@Query(“category“) String category);

    /**
     * 获取评论数据
     *
     * @param group_id
     * @param item_id
     * @param offset
     * @param count
     * @return
     */
    @GET(URL_COMMENT_LIST)
    Observable> getComment(@Query(“group_id“) String group_id @Query(“item_id“) String item_id @Query(“offset“) String offset @Query(“count“) String count);

    /**
     * 获取新闻详情
     */
    @GET
    Observable> getNewsDetail(@Url String url);

    /**
     * 获取视频页的html代码
     */
    @GET
    Observable getVideoHtml(@Url String url);

    /**
     * 获取视频数据json
     *
     * @param url
     * @return
     */
    @GET
    Observable> getVideoData(@Url String url);

    @GET
    Observable getImages(@Url String url);
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-05-09 01:59  TodayNews-master\
     文件          97  2017-05-09 01:59  TodayNews-master\.gitignore
     文件        5237  2017-05-09 01:59  TodayNews-master\README.md
     目录           0  2017-05-09 01:59  TodayNews-master\app\
     文件        2145  2017-05-09 01:59  TodayNews-master\app\build.gradle
     文件         645  2017-05-09 01:59  TodayNews-master\app\proguard-rules.pro
     目录           0  2017-05-09 01:59  TodayNews-master\app\src\
     目录           0  2017-05-09 01:59  TodayNews-master\app\src\main\
     文件        1632  2017-05-09 01:59  TodayNews-master\app\src\main\AndroidManifest.xml
     目录           0  2017-05-09 01:59  TodayNews-master\app\src\main\java\
     目录           0  2017-05-09 01:59  TodayNews-master\app\src\main\java\me\
     目录           0  2017-05-09 01:59  TodayNews-master\app\src\main\java\me\weyye\
     目录           0  2017-05-09 01:59  TodayNews-master\app\src\main\java\me\weyye\todaynews\
     目录           0  2017-05-09 01:59  TodayNews-master\app\src\main\java\me\weyye\todaynews\base\
     文件        1841  2017-05-09 01:59  TodayNews-master\app\src\main\java\me\weyye\todaynews\base\ApiService.java
     文件        2726  2017-05-09 01:59  TodayNews-master\app\src\main\java\me\weyye\todaynews\base\AppClient.java
     文件        8677  2017-05-09 01:59  TodayNews-master\app\src\main\java\me\weyye\todaynews\base\baseActivity.java
     文件        1401  2017-05-09 01:59  TodayNews-master\app\src\main\java\me\weyye\todaynews\base\baseApplication.java
     文件        1365  2017-05-09 01:59  TodayNews-master\app\src\main\java\me\weyye\todaynews\base\baseCallBack.java
     文件        3893  2017-05-09 01:59  TodayNews-master\app\src\main\java\me\weyye\todaynews\base\baseFragment.java
     文件        1406  2017-05-09 01:59  TodayNews-master\app\src\main\java\me\weyye\todaynews\base\baseMvpActivity.java
     文件        3310  2017-05-09 01:59  TodayNews-master\app\src\main\java\me\weyye\todaynews\base\baseMvpFragment.java
     文件        1509  2017-05-09 01:59  TodayNews-master\app\src\main\java\me\weyye\todaynews\base\basePresenter.java
     文件         219  2017-05-09 01:59  TodayNews-master\app\src\main\java\me\weyye\todaynews\base\GlobalParams.java
     文件         315  2017-05-09 01:59  TodayNews-master\app\src\main\java\me\weyye\todaynews\base\HtmlSubscriberCallBack.java
     文件         123  2017-05-09 01:59  TodayNews-master\app\src\main\java\me\weyye\todaynews\base\Presenter.java
     文件         372  2017-05-09 01:59  TodayNews-master\app\src\main\java\me\weyye\todaynews\base\ResultResponse.java
     文件         752  2017-05-09 01:59  TodayNews-master\app\src\main\java\me\weyye\todaynews\base\SubscriberCallBack.java
     文件         142  2017-05-09 01:59  TodayNews-master\app\src\main\java\me\weyye\todaynews\base\URL.java
     目录           0  2017-05-09 01:59  TodayNews-master\app\src\main\java\me\weyye\todaynews\listener\
     文件        2242  2017-05-09 01:59  TodayNews-master\app\src\main\java\me\weyye\todaynews\listener\ItemDragHelperCallBack.java
............此处省略498个文件信息

评论

共有 条评论