Commit d7ace444 by ydl

首页文章冥想动态剔除完成

parent 6f5dac52
package com.yidianling.dynamic
package com.yidianling.dynamic.bean
import com.ydl.ydlcommon.base.config.HttpConfig
......
......@@ -3,13 +3,21 @@ package com.yidianling.dynamic.modular.service
import android.app.Activity
import android.content.Context
import android.content.Intent
import android.support.v4.app.Fragment
import android.support.v4.app.FragmentActivity
import com.alibaba.android.arouter.facade.annotation.Route
import com.yidianling.dynamic.activity.MyTrendsActivity
import com.yidianling.dynamic.activity.TrendsReplyInfoActivity
import com.yidianling.dynamic.api.IDynamicService
import com.yidianling.dynamic.bean.DynamicConstants
import com.yidianling.dynamic.common.browsePictures.BrowsePicturesActivity
import com.yidianling.dynamic.common.tool.ImageCompress
import com.yidianling.dynamic.members.MembersActivity
import com.yidianling.dynamic.publishTrend.PublishTrendActivity
import com.yidianling.dynamic.topic.topicDetail.TopicDetailActivity
import com.yidianling.dynamic.trendsDetail.TrendsDetailActivity
import com.yidianling.dynamic.trendsHome.TrendsHomeFragment
import java.io.File
/**
* Created by haorui on 2019-12-17 .
......@@ -22,6 +30,12 @@ class DynamicServiceImp : IDynamicService {
}
override fun membersIntent(activity: Activity): Intent {
val intent = Intent()
intent.setClass(activity, MembersActivity::class.java)
return intent
}
override fun membersIntent(activity: Activity, userId: String): Intent {
return MembersActivity.newIntent(activity, userId)
}
......@@ -34,6 +48,11 @@ class DynamicServiceImp : IDynamicService {
return TrendsDetailActivity.newIntent(activity, trendId)
}
override fun startTrendsDetail(activity: Activity, trendId: Int, isSplash: Boolean, isComment: Boolean, isScrollToZan: Boolean, isScrollToComment: Boolean, lastId: Int) {
TrendsDetailActivity.start(activity, trendId, isSplash, isComment, isScrollToZan, isScrollToComment, lastId)
}
override fun trendsDetailIntent(activity: Activity, trendId: Int, isScrollToZan: Boolean): Intent {
return TrendsDetailActivity.newIntent(activity, trendId, isScrollToZan)
}
......@@ -46,6 +65,12 @@ class DynamicServiceImp : IDynamicService {
return PublishTrendActivity.newIntent(activity, url, cover, title)
}
override fun publishTrendIntent(activity: Activity): Intent {
val intent = Intent()
intent.setClass(activity, PublishTrendActivity::class.java)
return intent
}
override fun publishFmToTrend(activity: Activity, url: String, cover: String, title: String): Intent {
return PublishTrendActivity.newIntentForFm(activity, url, cover, title, 1)
}
......@@ -54,7 +79,37 @@ class DynamicServiceImp : IDynamicService {
return PublishTrendActivity.newIntentForArticle(activity, url, cover, title)
}
override fun topicDetailIntent(context: Context, isSplash: Boolean, topicId: String): Intent {
override fun topicDetailIntent(context: Activity, isSplash: Boolean, topicId: String): Intent {
return TopicDetailActivity.newIntent(context, isSplash, topicId)
}
override fun topicDetailIntent(context: Activity): Intent {
val intent = Intent()
intent.setClass(context, TopicDetailActivity::class.java)
return intent
}
override fun getTrendsHomeFragment(tabIndex: String): Fragment {
return TrendsHomeFragment().setTab(tabIndex)
}
override fun getPublicPicBrowType(): Int {
return DynamicConstants.PUBLISH_PIC_BROW
}
override fun imageCompressScal(activity: FragmentActivity, path: String, size: Int): File {
return ImageCompress.scal(activity, path, size)
}
override fun getBrosePictureActivityIntent(activity: Activity): Intent {
val intent = Intent()
intent.setClass(activity, BrowsePicturesActivity::class.java)
return intent
}
override fun getMyTrendsActivityIntent(activity: Activity): Intent {
val intent = Intent()
intent.setClass(activity, MyTrendsActivity::class.java)
return intent
}
}
\ No newline at end of file
......@@ -3,12 +3,17 @@ package com.yidianling.dynamic.api
import android.app.Activity
import android.content.Context
import android.content.Intent
import android.support.v4.app.Fragment
import android.support.v4.app.FragmentActivity
import com.alibaba.android.arouter.facade.template.IProvider
import java.io.File
interface IDynamicService : IProvider {
fun membersIntent(activity: Activity, userId: String): Intent
fun membersIntent(activity: Activity): Intent
fun replyInfoIntent(activity: Activity, replyId: String, aid: String): Intent
fun trendsDetailIntent(activity: Activity, trendId: Int): Intent
......@@ -17,12 +22,27 @@ interface IDynamicService : IProvider {
fun trendsDetailIntent(activity: Activity, trendId: Int, isScrollToZan: Boolean, lastId: Int): Intent
fun startTrendsDetail(activity: Activity, trendId: Int, isSplash: Boolean, isComment: Boolean, isScrollToZan: Boolean, isScrollToComment: Boolean, lastId: Int)
fun publishTrendIntent(activity: Activity, url: String, cover: String, title: String): Intent
fun publishTrendIntent(activity: Activity): Intent
fun publishFmToTrend(activity: Activity, url: String, cover: String, title: String): Intent
fun topicDetailIntent(context: Context, isSplash: Boolean, topicId: String): Intent
fun topicDetailIntent(context: Activity, isSplash: Boolean, topicId: String): Intent
fun topicDetailIntent(context: Activity): Intent
fun publishArticleToTrend(activity: Activity, url: String, cover: String, title: String): Intent
fun getBrosePictureActivityIntent(activity: Activity): Intent
fun getMyTrendsActivityIntent(activity: Activity): Intent
fun getTrendsHomeFragment(tabIndex: String): Fragment
fun getPublicPicBrowType(): Int
fun imageCompressScal(activity: FragmentActivity, path: String, size: Int): File
}
\ No newline at end of file
package com.yidianling.home.modular
import android.content.Context
import android.support.v4.app.Fragment
import com.alibaba.android.arouter.facade.annotation.Route
import com.yidianling.home.api.service.IHomeService
import com.yidianling.home.ui.fragment.YdlHomeFragment
import com.yidianling.home.ui.utils.Double11ActivityManagerUtils
@Route(path = "/home/HomeService")
......@@ -15,4 +17,8 @@ class HomeServiceImpl : IHomeService {
override fun setDouble11ShowType(mBool: Boolean) {
Double11ActivityManagerUtils.notShowDouble11Activity = mBool
}
override fun getYDLHomeFragment(): Fragment {
return YdlHomeFragment()
}
}
\ No newline at end of file
package com.yidianling.home.api.service
import android.support.v4.app.Fragment
import com.alibaba.android.arouter.facade.template.IProvider
interface IHomeService : IProvider {
......@@ -7,4 +8,6 @@ interface IHomeService : IProvider {
//如果是第一次登录则设置为true,表示不显示,避免与新用户弹框重复
fun setDouble11ShowType(mBool: Boolean)
fun getYDLHomeFragment(): Fragment
}
\ No newline at end of file
package com.yidianling.dynamic.common.tool;
package com.ydl.ydlcommon.view.banner;
import android.app.Activity;
import android.net.Uri;
......@@ -10,13 +10,13 @@ import com.ydl.ydl_image.config.ISimpleImageOpConfig;
import com.ydl.ydl_image.config.SimpleImageOpConfiger;
import com.ydl.ydl_image.manager.YDLImageCacheManager;
import com.ydl.ydl_image.module.GlideApp;
import com.yidianling.dynamic.R;
import com.ydl.ydlcommon.R;
/**
* Created by xiongyu on 2017/4/7.
*/
public class GlideImageLoader implements ImageLoader {
public class GlideImageDisplayLoader implements ImageLoader {
@Override
public void displayImage(Activity activity, String path, ImageView imageView, int width, int height) {
showImage(activity,path,imageView,width,height);
......@@ -39,8 +39,8 @@ public class GlideImageLoader implements ImageLoader {
private void showImage(Activity activity, String path, ImageView imageView, int width, int height){
SimpleImageOpConfiger sp = new SimpleImageOpConfiger();
sp.loadingPic = R.drawable.dynamic_default_img;
sp.errorPic = R.drawable.dynamic_default_img;
sp.loadingPic = R.drawable.platform_default_img;
sp.errorPic = R.drawable.platform_default_img;
sp.scaleType = ISimpleImageOpConfig.CENTER_CROP;
sp.isCacheOnDisk = false;
YDLImageCacheManager.showImage(activity,path,imageView,width, height,sp);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment