From 2e1e3d741b65404ded5d5731e9f634d4811fb97c Mon Sep 17 00:00:00 2001 From: huzongyao Date: Tue, 5 Jun 2018 11:29:21 +0800 Subject: [PATCH] simple compile --- appgbc/build.gradle | 2 +- appgg/build.gradle | 2 +- appnes/build.gradle | 2 +- .../nostalgia/framework/base/GameMenu.java | 44 +++++++------------ 4 files changed, 19 insertions(+), 31 deletions(-) diff --git a/appgbc/build.gradle b/appgbc/build.gradle index 152e43d..3866442 100644 --- a/appgbc/build.gradle +++ b/appgbc/build.gradle @@ -20,7 +20,7 @@ android { versionName "1.3.0" resConfigs "zh" ndk { - abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a', 'x86' + abiFilters 'armeabi', 'x86'//, 'armeabi-v7a', 'arm64-v8a' } externalNativeBuild { cmake { diff --git a/appgg/build.gradle b/appgg/build.gradle index 3e65fe8..379aa81 100644 --- a/appgg/build.gradle +++ b/appgg/build.gradle @@ -20,7 +20,7 @@ android { versionName "1.3.0" resConfigs "zh" ndk { - abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a', 'x86' + abiFilters 'armeabi', 'x86'//, 'armeabi-v7a', 'arm64-v8a' } externalNativeBuild { cmake { diff --git a/appnes/build.gradle b/appnes/build.gradle index be81b3f..15425e4 100644 --- a/appnes/build.gradle +++ b/appnes/build.gradle @@ -20,7 +20,7 @@ android { versionName "1.3.0" resConfigs "zh" ndk { - abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a', 'x86' + abiFilters 'armeabi', 'x86'//, 'armeabi-v7a', 'arm64-v8a' } externalNativeBuild { cmake { diff --git a/framework/src/main/java/nostalgia/framework/base/GameMenu.java b/framework/src/main/java/nostalgia/framework/base/GameMenu.java index 7c42995..219dee0 100644 --- a/framework/src/main/java/nostalgia/framework/base/GameMenu.java +++ b/framework/src/main/java/nostalgia/framework/base/GameMenu.java @@ -81,14 +81,11 @@ public void open() { dialog = new Dialog(context, R.style.GameDialogTheme); listener.onGameMenuPrepare(this); RelativeLayout surroundContainer = (RelativeLayout) inflater.inflate(R.layout.game_menu_surround, null); - surroundContainer.setOnClickListener(new OnClickListener() { - @Override - public void onClick(View v) { - if (dialog != null) - dialog.cancel(); - } + surroundContainer.setOnClickListener(v -> { + if (dialog != null) + dialog.cancel(); }); - LinearLayout container = (LinearLayout) surroundContainer.findViewById(R.id.game_menu_container); + LinearLayout container = surroundContainer.findViewById(R.id.game_menu_container); RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) container.getLayoutParams(); WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); Display display = wm.getDefaultDisplay(); @@ -136,19 +133,13 @@ public void onClick(View v) { } dialog.setContentView(surroundContainer); - dialog.setOnCancelListener(new OnCancelListener() { - @Override - public void onCancel(DialogInterface d) { - listener.onGameMenuClosed(GameMenu.this); - dialog = null; - } + dialog.setOnCancelListener(d -> { + listener.onGameMenuClosed(GameMenu.this); + dialog = null; }); - dialog.setOnDismissListener(new OnDismissListener() { - @Override - public void onDismiss(DialogInterface d) { - listener.onGameMenuClosed(GameMenu.this); - dialog = null; - } + dialog.setOnDismissListener(d -> { + listener.onGameMenuClosed(GameMenu.this); + dialog = null; }); DialogUtils.show(dialog, true); listener.onGameMenuOpened(this); @@ -156,16 +147,13 @@ public void onDismiss(DialogInterface d) { private View createButton(final GameMenuItem item, int margin, final Dialog dialog) { View view = inflater.inflate(R.layout.game_menu_item, null); - TextView label = (TextView) view.findViewById(R.id.game_menu_item_label); + TextView label = view.findViewById(R.id.game_menu_item_label); label.setText(item.getTitle()); - ImageView iconView = (ImageView) view.findViewById(R.id.game_menu_item_icon); - view.setOnClickListener(new OnClickListener() { - @Override - public void onClick(View v) { - listener.onGameMenuItemSelected(GameMenu.this, item); - dialog.dismiss(); - listener.onGameMenuClosed(GameMenu.this); - } + ImageView iconView = view.findViewById(R.id.game_menu_item_icon); + view.setOnClickListener(v -> { + listener.onGameMenuItemSelected(GameMenu.this, item); + dialog.dismiss(); + listener.onGameMenuClosed(GameMenu.this); }); int iconRID = item.iconRID;