对接语圈接口,
页面基本完成,评论完成一半,需要再调试
This commit is contained in:
@@ -35,6 +35,8 @@ dependencies {
|
||||
|
||||
implementation libs.appcompat
|
||||
implementation libs.material
|
||||
implementation libs.activity
|
||||
implementation libs.constraintlayout
|
||||
testImplementation libs.junit
|
||||
androidTestImplementation libs.ext.junit
|
||||
androidTestImplementation libs.espresso.core
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.QxLive" />
|
||||
android:theme="@style/Theme.QxLive">
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -4,13 +4,19 @@ import android.app.Activity;
|
||||
|
||||
import com.qxcm.moduleutil.activity.IPresenter;
|
||||
import com.qxcm.moduleutil.activity.IView;
|
||||
import com.qxcm.moduleutil.bean.NewsDataBean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class NewsContacts {
|
||||
public interface View extends IView<Activity> {
|
||||
|
||||
void getOfficialNoticeList(List<NewsDataBean> newsDataBeans);
|
||||
|
||||
}
|
||||
public interface IHomePre extends IPresenter {
|
||||
|
||||
void getOfficialNotice(String page,String page_limit,String type);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ import com.example.modulenews.databinding.FragmentNewsBinding;
|
||||
import com.example.modulenews.presenter.NewsPresenter;
|
||||
import com.qxcm.moduleutil.adapter.MyFragmentPagerAdapter;
|
||||
import com.qxcm.moduleutil.base.BaseMvpFragment;
|
||||
import com.qxcm.moduleutil.bean.NewsDataBean;
|
||||
import com.tencent.imsdk.v2.V2TIMConversation;
|
||||
import com.tencent.qcloud.tuicore.TUIConstants;
|
||||
import com.tencent.qcloud.tuicore.TUICore;
|
||||
@@ -89,4 +90,8 @@ public class NewsFragment extends BaseMvpFragment<NewsPresenter, FragmentNewsBin
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void getOfficialNoticeList(List<NewsDataBean> newsDataBeans) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -3,10 +3,61 @@ package com.example.modulenews.presenter;
|
||||
import android.content.Context;
|
||||
|
||||
import com.example.modulenews.contacts.NewsContacts;
|
||||
import com.qxcm.moduleutil.bean.NewsDataBean;
|
||||
import com.qxcm.moduleutil.http.BaseObserver;
|
||||
import com.qxcm.moduleutil.presenter.BasePresenter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.disposables.Disposable;
|
||||
|
||||
public class NewsPresenter extends BasePresenter<NewsContacts.View> implements NewsContacts.IHomePre {
|
||||
public NewsPresenter(NewsContacts.View view, Context context) {
|
||||
super(view, context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getOfficialNotice(String page, String page_limit, String type) {
|
||||
// api.getOfficialNotice(page, page_limit, type, new BaseObserver<List<NewsDataBean>>() {
|
||||
// @Override
|
||||
// public void onSubscribe(Disposable d) {
|
||||
// addDisposable(d);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onNext(List<NewsDataBean> newsDataBeans) {
|
||||
// MvpRef.get().getOfficialNoticeList(newsDataBeans);
|
||||
// }
|
||||
// });
|
||||
|
||||
List<NewsDataBean> newsDataBeans= new ArrayList<>();
|
||||
if (type.equals("1")){
|
||||
for (int i = 0; i < 5; i++) {
|
||||
NewsDataBean newsDataBean = new NewsDataBean();
|
||||
newsDataBean.setId(i+"");
|
||||
newsDataBean.setTitle("系统消息"+i);
|
||||
newsDataBean.setContent("系统消息"+i);
|
||||
newsDataBean.setType("1");
|
||||
newsDataBean.setSource_id("1");
|
||||
newsDataBean.setIs_read("1");
|
||||
newsDataBean.setCreatetime("2019-09-09");
|
||||
newsDataBean.setImage("");
|
||||
newsDataBeans.add(newsDataBean);
|
||||
}
|
||||
}else {
|
||||
for (int i = 0; i < 5; i++) {
|
||||
NewsDataBean newsDataBean = new NewsDataBean();
|
||||
newsDataBean.setId(i+"");
|
||||
newsDataBean.setTitle("官方公告"+i);
|
||||
newsDataBean.setContent("官方公告"+i);
|
||||
newsDataBean.setType("2");
|
||||
newsDataBean.setSource_id("1");
|
||||
newsDataBean.setIs_read("1");
|
||||
newsDataBean.setCreatetime("2019-09-09");
|
||||
newsDataBean.setImage("");
|
||||
newsDataBeans.add(newsDataBean);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
<resources>
|
||||
</resources>
|
||||
<resources></resources>
|
||||
Reference in New Issue
Block a user