1.开始玩设置全屏 2.梦工厂集成防沉迷库
This commit is contained in:
@ -370,6 +370,7 @@ class GameFragmentAdapter(context: Context,
|
||||
entity.type == EntranceUtils.HOST_COMMUNITY -> DirectUtils.directToCommunity(mContext, CommunityEntity(entity.link!!, entity.text!!))
|
||||
entity.type == "top_game_comment" -> DirectUtils.directToAmway(mContext, null, "(推荐入口)", "")
|
||||
entity.type == "server" -> mContext.startActivity(GameServersActivity.getIntent(mContext, "(推荐入口)", ""))
|
||||
entity.type == "h5_game_center" -> DirectUtils.directLetoGameCenter(mContext)
|
||||
else -> DialogUtils.showLowVersionDialog(mContext)
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,6 +7,7 @@ import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
import android.webkit.JavascriptInterface;
|
||||
import android.webkit.WebChromeClient;
|
||||
import android.webkit.WebSettings;
|
||||
@ -129,10 +130,12 @@ public class WebFragment extends NormalFragment {
|
||||
@Override
|
||||
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
if (TextUtils.isEmpty(mGameName)) {
|
||||
initMenu();
|
||||
} else {
|
||||
if (!TextUtils.isEmpty(mGameName) && mIsBackpressRequireConfirmation) {
|
||||
if (requireActivity() instanceof ToolbarController) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
requireActivity().getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
|
||||
DisplayUtils.setStatusBarColor(requireActivity(), R.color.tranparent, false);
|
||||
}
|
||||
((ToolbarController) requireActivity()).hideToolbar(true);
|
||||
closeBtn.setVisibility(View.VISIBLE);
|
||||
RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) closeBtn.getLayoutParams();
|
||||
@ -140,6 +143,8 @@ public class WebFragment extends NormalFragment {
|
||||
closeBtn.setLayoutParams(params);
|
||||
closeBtn.setOnClickListener(v -> onBackPressed());
|
||||
}
|
||||
} else {
|
||||
initMenu();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user