activity入口整理(涉及到外部启动(插件跳转/推送)的未完成)

This commit is contained in:
kehaoyuan
2017-09-25 17:22:07 +08:00
parent b483f7cdb6
commit ce0e28dad6
12 changed files with 58 additions and 78 deletions

View File

@ -22,8 +22,10 @@ import com.gh.base.BaseActivity;
import com.gh.common.util.CheckLoginUtils;
import com.gh.common.util.CollectionUtils;
import com.gh.common.util.DisplayUtils;
import com.gh.common.util.EntranceUtils;
import com.gh.common.util.ShareUtils;
import com.gh.gamecenter.entity.CommentnumEntity;
import com.gh.gamecenter.entity.NewsEntity;
import com.gh.gamecenter.entity.ToolBoxEntity;
import com.gh.gamecenter.entity.UserDataEntity;
import com.gh.gamecenter.retrofit.Response;
@ -84,16 +86,33 @@ public class WebActivity extends BaseActivity {
}
@NonNull
public static void startWebByCollectionTools(Context context, ToolBoxEntity toolBoxEntity) {
public static void startWebByCollectionTools(Context context, ToolBoxEntity toolBoxEntity, boolean isCollectionTools) {
Intent intent = new Intent(context, WebActivity.class);
intent.putExtra("url", toolBoxEntity.getUrl());
intent.putExtra("isTools", true);
intent.putExtra("gameName", toolBoxEntity.getName());
intent.putExtra("ToolBoxEntity", toolBoxEntity);
intent.putExtra("isCollectionTools", true);
intent.putExtra("isCollectionTools", isCollectionTools);
context.startActivity(intent);
}
@NonNull
public static Intent getIntentByNews(Context context, NewsEntity newsEntity, String entrance) {
Intent intent = new Intent(context, WebActivity.class);
intent.putExtra("url", newsEntity.getLink());
intent.putExtra("gameName", newsEntity.getGameName());
intent.putExtra("newsId", newsEntity.getId());
intent.putExtra(EntranceUtils.KEY_ENTRANCE, entrance);
return intent;
}
@NonNull
public static Intent getIntentByUrl(Context context, String url) {
Intent intent = new Intent(context, WebActivity.class);
intent.putExtra("url", url);
return intent;
}
@Override
protected int getLayoutId() {
return R.layout.activity_web;