Skip to content

Commit

Permalink
simple compile
Browse files Browse the repository at this point in the history
  • Loading branch information
huzongyao committed Jun 5, 2018
1 parent 48e0e07 commit 2e1e3d7
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 31 deletions.
2 changes: 1 addition & 1 deletion appgbc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion appgg/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion appnes/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
44 changes: 16 additions & 28 deletions framework/src/main/java/nostalgia/framework/base/GameMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -136,36 +133,27 @@ 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);
}

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;

Expand Down

0 comments on commit 2e1e3d7

Please sign in to comment.