zengjiebin лет назад: 7
Родитель
Сommit
3a0e29d843

+ 8 - 0
app/src/main/java/com/kfzs/duanduan/utils/NumberFormatUtils.java

@@ -4,6 +4,7 @@ import android.text.TextUtils;
 
 import java.math.BigDecimal;
 import java.text.DecimalFormat;
+import java.util.Locale;
 
 /**
  *
@@ -108,4 +109,11 @@ public class NumberFormatUtils {
         DecimalFormat df = new DecimalFormat("0.00");
         return df.format(bonus);
     }
+
+    //获取次数
+    public static String getText(int no) {
+        if(no > 10000)
+            return String.format(Locale.CHINA, "%d万", no / 10000);
+        return String.valueOf(no);
+    }
 }

+ 12 - 12
app/src/main/java/com/sheep/gamegroup/greendao/download/DaoMaster.java

@@ -21,24 +21,24 @@ public class DaoMaster extends AbstractDaoMaster {
 
     /** Creates underlying database table using DAOs. */
     public static void createAllTables(Database db, boolean ifNotExists) {
-        ProcessRecordDao.createTable(db, ifNotExists);
+        AcceptTaskRecordDao.createTable(db, ifNotExists);
         AppdownloadBeanDao.createTable(db, ifNotExists);
-        SdkLoginUserDao.createTable(db, ifNotExists);
+        DownLoadInfoDao.createTable(db, ifNotExists);
+        ProcessRecordDao.createTable(db, ifNotExists);
         ScreenShotRecordDao.createTable(db, ifNotExists);
-        AcceptTaskRecordDao.createTable(db, ifNotExists);
+        SdkLoginUserDao.createTable(db, ifNotExists);
         SearchRecordDao.createTable(db, ifNotExists);
-        DownLoadInfoDao.createTable(db, ifNotExists);
     }
 
     /** Drops underlying database table using DAOs. */
     public static void dropAllTables(Database db, boolean ifExists) {
-        ProcessRecordDao.dropTable(db, ifExists);
+        AcceptTaskRecordDao.dropTable(db, ifExists);
         AppdownloadBeanDao.dropTable(db, ifExists);
-        SdkLoginUserDao.dropTable(db, ifExists);
+        DownLoadInfoDao.dropTable(db, ifExists);
+        ProcessRecordDao.dropTable(db, ifExists);
         ScreenShotRecordDao.dropTable(db, ifExists);
-        AcceptTaskRecordDao.dropTable(db, ifExists);
+        SdkLoginUserDao.dropTable(db, ifExists);
         SearchRecordDao.dropTable(db, ifExists);
-        DownLoadInfoDao.dropTable(db, ifExists);
     }
 
     /**
@@ -57,13 +57,13 @@ public class DaoMaster extends AbstractDaoMaster {
 
     public DaoMaster(Database db) {
         super(db, SCHEMA_VERSION);
-        registerDaoClass(ProcessRecordDao.class);
+        registerDaoClass(AcceptTaskRecordDao.class);
         registerDaoClass(AppdownloadBeanDao.class);
-        registerDaoClass(SdkLoginUserDao.class);
+        registerDaoClass(DownLoadInfoDao.class);
+        registerDaoClass(ProcessRecordDao.class);
         registerDaoClass(ScreenShotRecordDao.class);
-        registerDaoClass(AcceptTaskRecordDao.class);
+        registerDaoClass(SdkLoginUserDao.class);
         registerDaoClass(SearchRecordDao.class);
-        registerDaoClass(DownLoadInfoDao.class);
     }
 
     public DaoSession newSession() {

+ 47 - 47
app/src/main/java/com/sheep/gamegroup/greendao/download/DaoSession.java

@@ -8,21 +8,21 @@ import org.greenrobot.greendao.database.Database;
 import org.greenrobot.greendao.identityscope.IdentityScopeType;
 import org.greenrobot.greendao.internal.DaoConfig;
 
-import com.sheep.gamegroup.greendao.download.ProcessRecord;
+import com.sheep.gamegroup.greendao.download.AcceptTaskRecord;
 import com.sheep.gamegroup.greendao.download.AppdownloadBean;
-import com.sheep.gamegroup.greendao.download.SdkLoginUser;
+import com.sheep.gamegroup.greendao.download.DownLoadInfo;
+import com.sheep.gamegroup.greendao.download.ProcessRecord;
 import com.sheep.gamegroup.greendao.download.ScreenShotRecord;
-import com.sheep.gamegroup.greendao.download.AcceptTaskRecord;
+import com.sheep.gamegroup.greendao.download.SdkLoginUser;
 import com.sheep.gamegroup.greendao.download.SearchRecord;
-import com.sheep.gamegroup.greendao.download.DownLoadInfo;
 
-import com.sheep.gamegroup.greendao.download.ProcessRecordDao;
+import com.sheep.gamegroup.greendao.download.AcceptTaskRecordDao;
 import com.sheep.gamegroup.greendao.download.AppdownloadBeanDao;
-import com.sheep.gamegroup.greendao.download.SdkLoginUserDao;
+import com.sheep.gamegroup.greendao.download.DownLoadInfoDao;
+import com.sheep.gamegroup.greendao.download.ProcessRecordDao;
 import com.sheep.gamegroup.greendao.download.ScreenShotRecordDao;
-import com.sheep.gamegroup.greendao.download.AcceptTaskRecordDao;
+import com.sheep.gamegroup.greendao.download.SdkLoginUserDao;
 import com.sheep.gamegroup.greendao.download.SearchRecordDao;
-import com.sheep.gamegroup.greendao.download.DownLoadInfoDao;
 
 // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
 
@@ -33,100 +33,100 @@ import com.sheep.gamegroup.greendao.download.DownLoadInfoDao;
  */
 public class DaoSession extends AbstractDaoSession {
 
-    private final DaoConfig processRecordDaoConfig;
+    private final DaoConfig acceptTaskRecordDaoConfig;
     private final DaoConfig appdownloadBeanDaoConfig;
-    private final DaoConfig sdkLoginUserDaoConfig;
+    private final DaoConfig downLoadInfoDaoConfig;
+    private final DaoConfig processRecordDaoConfig;
     private final DaoConfig screenShotRecordDaoConfig;
-    private final DaoConfig acceptTaskRecordDaoConfig;
+    private final DaoConfig sdkLoginUserDaoConfig;
     private final DaoConfig searchRecordDaoConfig;
-    private final DaoConfig downLoadInfoDaoConfig;
 
-    private final ProcessRecordDao processRecordDao;
+    private final AcceptTaskRecordDao acceptTaskRecordDao;
     private final AppdownloadBeanDao appdownloadBeanDao;
-    private final SdkLoginUserDao sdkLoginUserDao;
+    private final DownLoadInfoDao downLoadInfoDao;
+    private final ProcessRecordDao processRecordDao;
     private final ScreenShotRecordDao screenShotRecordDao;
-    private final AcceptTaskRecordDao acceptTaskRecordDao;
+    private final SdkLoginUserDao sdkLoginUserDao;
     private final SearchRecordDao searchRecordDao;
-    private final DownLoadInfoDao downLoadInfoDao;
 
     public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
             daoConfigMap) {
         super(db);
 
-        processRecordDaoConfig = daoConfigMap.get(ProcessRecordDao.class).clone();
-        processRecordDaoConfig.initIdentityScope(type);
+        acceptTaskRecordDaoConfig = daoConfigMap.get(AcceptTaskRecordDao.class).clone();
+        acceptTaskRecordDaoConfig.initIdentityScope(type);
 
         appdownloadBeanDaoConfig = daoConfigMap.get(AppdownloadBeanDao.class).clone();
         appdownloadBeanDaoConfig.initIdentityScope(type);
 
-        sdkLoginUserDaoConfig = daoConfigMap.get(SdkLoginUserDao.class).clone();
-        sdkLoginUserDaoConfig.initIdentityScope(type);
+        downLoadInfoDaoConfig = daoConfigMap.get(DownLoadInfoDao.class).clone();
+        downLoadInfoDaoConfig.initIdentityScope(type);
+
+        processRecordDaoConfig = daoConfigMap.get(ProcessRecordDao.class).clone();
+        processRecordDaoConfig.initIdentityScope(type);
 
         screenShotRecordDaoConfig = daoConfigMap.get(ScreenShotRecordDao.class).clone();
         screenShotRecordDaoConfig.initIdentityScope(type);
 
-        acceptTaskRecordDaoConfig = daoConfigMap.get(AcceptTaskRecordDao.class).clone();
-        acceptTaskRecordDaoConfig.initIdentityScope(type);
+        sdkLoginUserDaoConfig = daoConfigMap.get(SdkLoginUserDao.class).clone();
+        sdkLoginUserDaoConfig.initIdentityScope(type);
 
         searchRecordDaoConfig = daoConfigMap.get(SearchRecordDao.class).clone();
         searchRecordDaoConfig.initIdentityScope(type);
 
-        downLoadInfoDaoConfig = daoConfigMap.get(DownLoadInfoDao.class).clone();
-        downLoadInfoDaoConfig.initIdentityScope(type);
-
-        processRecordDao = new ProcessRecordDao(processRecordDaoConfig, this);
+        acceptTaskRecordDao = new AcceptTaskRecordDao(acceptTaskRecordDaoConfig, this);
         appdownloadBeanDao = new AppdownloadBeanDao(appdownloadBeanDaoConfig, this);
-        sdkLoginUserDao = new SdkLoginUserDao(sdkLoginUserDaoConfig, this);
+        downLoadInfoDao = new DownLoadInfoDao(downLoadInfoDaoConfig, this);
+        processRecordDao = new ProcessRecordDao(processRecordDaoConfig, this);
         screenShotRecordDao = new ScreenShotRecordDao(screenShotRecordDaoConfig, this);
-        acceptTaskRecordDao = new AcceptTaskRecordDao(acceptTaskRecordDaoConfig, this);
+        sdkLoginUserDao = new SdkLoginUserDao(sdkLoginUserDaoConfig, this);
         searchRecordDao = new SearchRecordDao(searchRecordDaoConfig, this);
-        downLoadInfoDao = new DownLoadInfoDao(downLoadInfoDaoConfig, this);
 
-        registerDao(ProcessRecord.class, processRecordDao);
+        registerDao(AcceptTaskRecord.class, acceptTaskRecordDao);
         registerDao(AppdownloadBean.class, appdownloadBeanDao);
-        registerDao(SdkLoginUser.class, sdkLoginUserDao);
+        registerDao(DownLoadInfo.class, downLoadInfoDao);
+        registerDao(ProcessRecord.class, processRecordDao);
         registerDao(ScreenShotRecord.class, screenShotRecordDao);
-        registerDao(AcceptTaskRecord.class, acceptTaskRecordDao);
+        registerDao(SdkLoginUser.class, sdkLoginUserDao);
         registerDao(SearchRecord.class, searchRecordDao);
-        registerDao(DownLoadInfo.class, downLoadInfoDao);
     }
     
     public void clear() {
-        processRecordDaoConfig.clearIdentityScope();
+        acceptTaskRecordDaoConfig.clearIdentityScope();
         appdownloadBeanDaoConfig.clearIdentityScope();
-        sdkLoginUserDaoConfig.clearIdentityScope();
+        downLoadInfoDaoConfig.clearIdentityScope();
+        processRecordDaoConfig.clearIdentityScope();
         screenShotRecordDaoConfig.clearIdentityScope();
-        acceptTaskRecordDaoConfig.clearIdentityScope();
+        sdkLoginUserDaoConfig.clearIdentityScope();
         searchRecordDaoConfig.clearIdentityScope();
-        downLoadInfoDaoConfig.clearIdentityScope();
     }
 
-    public ProcessRecordDao getProcessRecordDao() {
-        return processRecordDao;
+    public AcceptTaskRecordDao getAcceptTaskRecordDao() {
+        return acceptTaskRecordDao;
     }
 
     public AppdownloadBeanDao getAppdownloadBeanDao() {
         return appdownloadBeanDao;
     }
 
-    public SdkLoginUserDao getSdkLoginUserDao() {
-        return sdkLoginUserDao;
+    public DownLoadInfoDao getDownLoadInfoDao() {
+        return downLoadInfoDao;
+    }
+
+    public ProcessRecordDao getProcessRecordDao() {
+        return processRecordDao;
     }
 
     public ScreenShotRecordDao getScreenShotRecordDao() {
         return screenShotRecordDao;
     }
 
-    public AcceptTaskRecordDao getAcceptTaskRecordDao() {
-        return acceptTaskRecordDao;
+    public SdkLoginUserDao getSdkLoginUserDao() {
+        return sdkLoginUserDao;
     }
 
     public SearchRecordDao getSearchRecordDao() {
         return searchRecordDao;
     }
 
-    public DownLoadInfoDao getDownLoadInfoDao() {
-        return downLoadInfoDao;
-    }
-
 }

+ 7 - 3
app/src/main/java/com/sheep/gamegroup/model/api/ApiService.java

@@ -1481,13 +1481,17 @@ public interface ApiService {
 //---------------------------start 小绵羊3.4.5 视频-------------------------------------
 
     /**
-     * 小绵羊3.4.5
-     * 获取七牛上传凭证
+     * 小绵羊3.4.5新增 -- 查询视频列表
+     */
+    @GET(ApiKey.getVideoList)
+    Observable<BaseMessage> getVideoList(@Query("page") int page, @Query("per_page") int per_page);
+    /**
+     * 小绵羊3.4.5新增 -- 获取七牛上传凭证
      */
     @GET("app/video/token")
     Observable<BaseMessage> getVideoToken();
     /**
-     * 用户视频发布
+     * 小绵羊3.4.5新增 -- 用户视频发布
      * UserAddressReqUserAddressReq
      */
     @POST("app/video")

+ 198 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/DiscoveryVideo.java

@@ -0,0 +1,198 @@
+package com.sheep.gamegroup.model.entity;
+
+/**
+ * Created by realicing on 2018/11/27.
+ * realicing@sina.com
+ * 小绵羊3.4.5新增 -- 发现视频
+ * <p>
+ * update_time:	integer ($int64)
+ * resource_type:	integer ($int32)
+ * 资源类型(1视频,2图片)
+ * topic_id:	integer ($int64)
+ * 话题id
+ * is_like:	boolean
+ * 是否点赞
+ * resource:	string
+ * 视频图片资源,逗号分隔
+ * topic:	string
+ * 话题
+ * user_id:	integer ($int64)
+ * 用户id
+ * create_time:	integer ($int64)
+ * status:	integer ($int32)
+ * 状态(1通过,2不通过,3未审核)
+ * invitation_code:	string
+ * 绵羊号
+ * duration:	integer ($int64)
+ * 视频时长
+ * play:	integer ($int64)
+ * 播放数
+ * like:	integer ($int64)
+ * 点赞数
+ * cover:	string
+ * 视频封面
+ * title:	string
+ * 主题
+ * id:	integer ($int64)
+ * sort:	integer ($int64)
+ * 序号,越小越靠前
+ * comment:	integer ($int64)
+ * 评论数
+ * share:	integer ($int64)
+ * 分享数
+ */
+public class DiscoveryVideo {
+    private int comment;
+
+    private String cover;
+
+    private int create_time;
+
+    private int duration;
+
+    private int id;
+
+    private String invitation_code;
+
+    private boolean is_like;
+
+    private int like;
+
+    private int play;
+
+    private String resource;
+
+    private int resource_type;
+
+    private int share;
+
+    private int sort;
+
+    private int status;
+
+    private String title;
+
+    private String topic;
+
+    private int topic_id;
+
+    private int update_time;
+
+    private int user_id;
+
+    public void setComment(int comment){
+        this.comment = comment;
+    }
+    public int getComment(){
+        return this.comment;
+    }
+    public void setCover(String cover){
+        this.cover = cover;
+    }
+    public String getCover(){
+        return this.cover;
+    }
+    public void setCreate_time(int create_time){
+        this.create_time = create_time;
+    }
+    public int getCreate_time(){
+        return this.create_time;
+    }
+    public void setDuration(int duration){
+        this.duration = duration;
+    }
+    public int getDuration(){
+        return this.duration;
+    }
+    public void setId(int id){
+        this.id = id;
+    }
+    public int getId(){
+        return this.id;
+    }
+    public void setInvitation_code(String invitation_code){
+        this.invitation_code = invitation_code;
+    }
+    public String getInvitation_code(){
+        return this.invitation_code;
+    }
+    public void setIs_like(boolean is_like){
+        this.is_like = is_like;
+    }
+    public boolean getIs_like(){
+        return this.is_like;
+    }
+    public void setLike(int like){
+        this.like = like;
+    }
+    public int getLike(){
+        return this.like;
+    }
+    public void setPlay(int play){
+        this.play = play;
+    }
+    public int getPlay(){
+        return this.play;
+    }
+    public void setResource(String resource){
+        this.resource = resource;
+    }
+    public String getResource(){
+        return this.resource;
+    }
+    public void setResource_type(int resource_type){
+        this.resource_type = resource_type;
+    }
+    public int getResource_type(){
+        return this.resource_type;
+    }
+    public void setShare(int share){
+        this.share = share;
+    }
+    public int getShare(){
+        return this.share;
+    }
+    public void setSort(int sort){
+        this.sort = sort;
+    }
+    public int getSort(){
+        return this.sort;
+    }
+    public void setStatus(int status){
+        this.status = status;
+    }
+    public int getStatus(){
+        return this.status;
+    }
+    public void setTitle(String title){
+        this.title = title;
+    }
+    public String getTitle(){
+        return this.title;
+    }
+    public void setTopic(String topic){
+        this.topic = topic;
+    }
+    public String getTopic(){
+        return this.topic;
+    }
+    public void setTopic_id(int topic_id){
+        this.topic_id = topic_id;
+    }
+    public int getTopic_id(){
+        return this.topic_id;
+    }
+    public void setUpdate_time(int update_time){
+        this.update_time = update_time;
+    }
+    public int getUpdate_time(){
+        return this.update_time;
+    }
+    public void setUser_id(int user_id){
+        this.user_id = user_id;
+    }
+    public int getUser_id(){
+        return this.user_id;
+    }
+
+}

+ 11 - 0
app/src/main/java/com/sheep/gamegroup/util/TimeUtil.java

@@ -239,6 +239,17 @@ public class TimeUtil {
         }
     }
 
+    public static String getDurationText(int duration) {
+        if(duration > 3600)
+            return String.format(Locale.CHINA, "%d:%d:%d", duration / 3600, duration / 60 % 60, duration % 60);
+        else if(duration > 60)
+            return String.format(Locale.CHINA, "%d:%d", duration / 60, duration % 60);
+        else if(duration > 0)
+            return String.format(Locale.CHINA, "%d:%d", 0, duration % 60);
+        else
+            return "00:01";
+    }
+
     /**
      * 是否大于今天
      */

+ 47 - 0
app/src/main/java/com/sheep/gamegroup/view/adapter/AdpVideo.java

@@ -0,0 +1,47 @@
+package com.sheep.gamegroup.view.adapter;
+
+import android.view.View;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.kfzs.appstore.utils.adapter.recyclerview.RecyclerViewAdapter;
+import com.kfzs.appstore.utils.adapter.recyclerview.ViewHolder;
+import com.kfzs.duanduan.utils.NumberFormatUtils;
+import com.sheep.gamegroup.model.entity.DiscoveryVideo;
+import com.sheep.gamegroup.util.Jump2View;
+import com.sheep.gamegroup.util.TimeUtil;
+import com.sheep.gamegroup.util.ViewUtil;
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+
+import java.util.List;
+import java.util.Locale;
+
+/**
+ * Created by realicing on 2018/11/27.
+ * realicing@sina.com
+ * 小绵羊3.4.5新增 -- 视频
+ */
+public class AdpVideo extends RecyclerViewAdapter<DiscoveryVideo> {
+    public AdpVideo(int layoutId, List<DiscoveryVideo> datas) {
+        super(SheepApp.getInstance(), layoutId, datas);
+    }
+
+    @Override
+    public void convert(ViewHolder viewHolder, final DiscoveryVideo item, int position) {
+        ImageView item_video_cover = viewHolder.itemView.findViewById(R.id.item_video_cover);
+        TextView item_video_play_no_tv = viewHolder.itemView.findViewById(R.id.item_video_play_no_tv);
+        TextView item_video_time_tv = viewHolder.itemView.findViewById(R.id.item_video_time_tv);
+        ViewUtil.setImage(item_video_cover, item.getCover());
+        ViewUtil.setVisibility(item_video_play_no_tv, item.getPlay() > 0);
+        ViewUtil.setText(item_video_play_no_tv, String.format(Locale.CHINA, "%s次播放", NumberFormatUtils.getText(item.getPlay())));
+        ViewUtil.setText(item_video_time_tv, TimeUtil.getDurationText(item.getDuration()));
+
+        viewHolder.itemView.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                Jump2View.getInstance().goActPlayVideo(item.getResource(), true);
+            }
+        });
+    }
+}

+ 5 - 1
app/src/main/java/com/sheep/gamegroup/view/fragment/BaseListFragment2.java

@@ -97,10 +97,14 @@ public abstract class BaseListFragment2<T> extends BaseFragment implements IRefr
             }
         });
         bottomLine = ViewUtil.setBottomLine(view_list, getNoMoreCallBack());
-        view_list.setLayoutManager(new LinearLayoutManager(SheepApp.getInstance()));
+        view_list.setLayoutManager(getLayoutManager());
         view_list.setAdapter(getAdapter());
     }
 
+    protected RecyclerView.LayoutManager getLayoutManager() {
+        return new LinearLayoutManager(SheepApp.getInstance());
+    }
+
     public void loadMoreData() {
         if (!loadMore) {
             loadMore = true;

+ 80 - 0
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtArticleVideo.java

@@ -0,0 +1,80 @@
+package com.sheep.gamegroup.view.fragment;
+
+import android.os.Bundle;
+import android.support.annotation.Nullable;
+import android.support.v7.widget.RecyclerView;
+import android.support.v7.widget.StaggeredGridLayoutManager;
+
+import com.sheep.gamegroup.model.api.ApiService;
+import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.entity.DiscoveryVideo;
+import com.sheep.gamegroup.view.adapter.AdpVideo;
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.utils.G;
+
+import org.afinal.simplecache.ApiKey;
+
+import io.reactivex.Observable;
+
+/**
+ * Created by realicing on 2018/9/7.
+ * realicing@sina.com
+ * 小绵羊3.4.5新增 -- 发现视频列表
+ */
+public class FgtArticleVideo extends BaseListFragment2<DiscoveryVideo> {
+    @Override
+    public void initView() {
+        super.initView();
+        view_list.setPadding(G.getRealPix(8), G.getRealPix(14), G.getRealPix(8), G.getRealPix(14));
+    }
+
+    @Override
+    protected RecyclerView.LayoutManager getLayoutManager() {
+        StaggeredGridLayoutManager layoutManager = new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL);
+//        layoutManager.setItemPrefetchEnabled(true);
+//        layoutManager.setMeasurementCacheEnabled(true);
+        return layoutManager;
+    }
+
+    @Override
+    protected RecyclerView.Adapter getAdapter() {
+        return new AdpVideo(R.layout.item_video, list);
+    }
+
+    @Override
+    protected String getKey(int page, int per_page) {
+        return ApiKey.pageKeyUrl(ApiKey.getVideoList, page, per_page);
+    }
+
+    @Override
+    protected Observable<BaseMessage> getApi(ApiService apiService) {
+        return apiService.getVideoList(page, per_page);
+    }
+
+    @Override
+    protected Class<DiscoveryVideo> getTClass() {
+        return DiscoveryVideo.class;
+    }
+
+    private int type;
+
+    public static FgtArticleVideo newInstance(int type) {
+        FgtArticleVideo fgt = new FgtArticleVideo();
+        Bundle bundle = new Bundle();
+        bundle.putInt("type", type);
+        fgt.setArguments(bundle);
+        return fgt;
+    }
+
+
+    @Override
+    public void onCreate(@Nullable Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        Bundle bundle = getArguments();
+        if (bundle != null) {
+            type = bundle.getInt("type", 0);
+        }
+    }
+
+
+}

+ 8 - 1
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtFind.java

@@ -187,7 +187,14 @@ public class FgtFind extends BaseFragment {
                     int awaken_on = NumberFormatUtils.parseInteger(url);
                     int count = 1;
                     for (ArticleTag findLabel : list) {
-                        mAdapter.add(FgtFindChild.newInstance(findLabel.getId()), findLabel.getName());
+                        switch (findLabel.getName()) {
+                            case "视频":
+                                mAdapter.add(FgtArticleVideo.newInstance(findLabel.getId()), findLabel.getName());
+                                break;
+                            default:
+                                mAdapter.add(FgtFindChild.newInstance(findLabel.getId()), findLabel.getName());
+                                break;
+                        }
                         count++;
                     }
                     if (awaken_on == 1) {

+ 2 - 0
app/src/main/java/org/afinal/simplecache/ApiKey.java

@@ -62,6 +62,8 @@ public class ApiKey {
     //每日分享
     public static final String getShareList = "app/share/shares";
     public static final String sendShareResult = "app/share/share";
+    //获取发布中视频列表
+    public static final String getVideoList = "app/video/list";
     public static final String pageKeyUrl(String baseUrl, int page, int per_page){
         return String.format(Locale.CHINA, "%s?page=%d&per_page=%d", baseUrl, page, per_page);
     }

+ 1 - 1
app/src/main/res/layout/act_publish_article.xml

@@ -12,7 +12,7 @@
         android:layout_height="wrap_content"
         android:layout_marginTop="?attr/actionBarSize"
         android:gravity="top|start"
-        android:hint="@string/please_input_content"
+        android:hint="@string/please_say_something"
         android:maxLength="200"
         android:background="@null"
         android:minHeight="200dp"

+ 45 - 0
app/src/main/res/layout/item_video.xml

@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:paddingStart="8dp"
+    android:paddingTop="6dp"
+    android:paddingEnd="8dp"
+    android:paddingBottom="6dp">
+
+    <ImageView
+        android:id="@+id/item_video_cover"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:adjustViewBounds="true"
+        android:scaleType="fitXY" />
+
+    <ImageView
+        android:layout_width="38dp"
+        android:layout_height="38dp"
+        android:layout_centerInParent="true"
+        android:src="@drawable/ic_play_but_image" />
+
+    <TextView
+        android:id="@+id/item_video_play_no_tv"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_alignBottom="@id/item_video_cover"
+        android:gravity="start"
+        android:padding="5dp"
+        android:text="11万次播放"
+        android:textColor="#ffffffff"
+        android:textSize="10sp" />
+
+    <TextView
+        android:id="@+id/item_video_time_tv"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_alignBottom="@id/item_video_cover"
+        android:gravity="end"
+        android:padding="5dp"
+        android:text="1:40"
+        android:textColor="#ffffffff"
+        android:textSize="10sp" />
+
+</RelativeLayout>

+ 1 - 1
app/src/main/res/values/strings.xml

@@ -138,5 +138,5 @@
     <!--小绵羊3.4.5新增功能 我的关注-->
     <string name="hot_user">热门玩家</string>
     <!--小绵羊3.4.5新增功能 发布发现-->
-    <string name="please_input_content">请输入您的想法</string>
+    <string name="please_say_something">说点什么~</string>
 </resources>