activity入口整理(涉及到外部启动(插件跳转/推送)的未完成)
This commit is contained in:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user