Skip to content

Commit

Permalink
add v16 and 17 to java versions
Browse files Browse the repository at this point in the history
  • Loading branch information
PranavPurwar committed Apr 12, 2022
1 parent 124d008 commit 6ba8a38
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 8 deletions.
14 changes: 14 additions & 0 deletions app/src/main/java/com/pranav/java/ide/SettingActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ public class SettingActivity extends AppCompatActivity {
private MaterialRadioButton java13;
private MaterialRadioButton java14;
private MaterialRadioButton java15;
private MaterialRadioButton java16;
private MaterialRadioButton java17;

private MaterialRadioButton dexer_d8;

Expand Down Expand Up @@ -54,6 +56,8 @@ protected void onCreate(Bundle savedInstanceState) {
java13 = findViewById(R.id.java13);
java14 = findViewById(R.id.java14);
java15 = findViewById(R.id.java15);
java16 = findViewById(R.id.java16);
java17 = findViewById(R.id.java17);

final MaterialRadioButton java7 = findViewById(R.id.java7);
final MaterialRadioButton dexer_dx = findViewById(R.id.dexer_dx);
Expand Down Expand Up @@ -110,6 +114,14 @@ protected void onCreate(Bundle savedInstanceState) {
case "15.0":
java15.setChecked(true);
break;

case "16.0":
java16.setChecked(true);
break

case "17.0":
java17.setChecked(true);
break;

case "7.0":
default:
Expand Down Expand Up @@ -146,6 +158,8 @@ public void onDestroy() {
else if (java13.isChecked()) version = 13.0;
else if (java14.isChecked()) version = 14.0;
else if (java15.isChecked()) version = 15.0;
else if (java16.isChecked()) version = 16.0;
else if (java17.isChecked()) version = 17.0;
settings.edit().putString("javaVersion", String.valueOf(version)).apply();
String dexer = "dx";
if (dexer_d8.isChecked()) dexer = "d8";
Expand Down
32 changes: 24 additions & 8 deletions app/src/main/res/layout/activity_setting.xml
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,30 @@
android:text="14.0"
android:textSize="12sp"
android:textColor="#000000" />
<com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/java15"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="8dp"
android:text="15.0"
android:textSize="12sp"
android:textColor="#000000" />
<com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/java15"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="8dp"
android:text="15.0"
android:textSize="12sp"
android:textColor="#000000" />
<com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/java16"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="8dp"
android:text="16.0"
android:textSize="12sp"
android:textColor="#000000" />
<com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/java17"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="8dp"
android:text="17.0"
android:textSize="12sp"
android:textColor="#000000" />
</RadioGroup>
</HorizontalScrollView>
<com.google.android.material.textview.MaterialTextView
Expand Down

0 comments on commit 6ba8a38

Please sign in to comment.