Skip to content

Commit

Permalink
hhh2
Browse files Browse the repository at this point in the history
  • Loading branch information
aikrq committed Nov 3, 2024
1 parent 1773afa commit 3c36a55
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions app/src/main/java/mod/hey/studios/build/BuildSettingsDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ public BuildSettingsDialog(Activity activity, String sc_id) {
views = new View[totalViews];
binding = ProjectConfigLayoutBinding.inflate(activity.getLayoutInflater());

// necessary for mod.hey.studios.project.ProjectSettings, since it checks
// for the presence of a tag if missing it cannot save the data
addTagsForViews();

views[VIEW_ANDROIR_JAR_PATH] = binding.tilAndroidJar.getEditText();
views[VIEW_CLASS_PATH] = binding.tilClasspath.getEditText();
views[VIEW_DEXER] = binding.rgDexer;
Expand All @@ -55,22 +59,18 @@ public BuildSettingsDialog(Activity activity, String sc_id) {
}

private void addTagsForViews() {
views[VIEW_ANDROIR_JAR_PATH].setTag(SETTING_ANDROID_JAR_PATH);
views[VIEW_CLASS_PATH].setTag(SETTING_CLASSPATH);
views[VIEW_DEXER].setTag(SETTING_DEXER);
views[VIEW_ENABLE_LOGCAT].setTag(SETTING_ENABLE_LOGCAT);
views[VIEW_JAVA_VERSION].setTag(SETTING_JAVA_VERSION);
views[VIEW_NO_HTTP_LEGACY].setTag(SETTING_NO_HTTP_LEGACY);
views[VIEW_NO_WARNINGS].setTag(SETTING_NO_WARNINGS);
binding.tilAndroidJar.getEditText().setTag(SETTING_ANDROID_JAR_PATH);
binding.tilClasspath.getEditText().setTag(SETTING_CLASSPATH);
binding.rgDexer.setTag(SETTING_DEXER);
binding.cbEnableLogcat.setTag(SETTING_ENABLE_LOGCAT);
binding.rgJavaVersion.setTag(SETTING_JAVA_VERSION);
binding.cbNoHttpLegacy.setTag(SETTING_NO_HTTP_LEGACY);
binding.cbNoWarnings.setTag(SETTING_NO_WARNINGS);
}

public void show() {
assert views != null || views.length != 0;

// necessary for mod.hey.studios.project.ProjectSettings, since it checks
// for the presence of a tag if missing it cannot save the data
addTagsForViews();

getEditText(VIEW_ANDROIR_JAR_PATH).setText(settings.getValue(SETTING_ANDROID_JAR_PATH, ""));
getEditText(VIEW_CLASS_PATH).setText(settings.getValue(SETTING_CLASSPATH, ""));

Expand Down

0 comments on commit 3c36a55

Please sign in to comment.