diff --git a/app/src/main/java/com/wbrawner/simplemarkdown/view/activity/SettingsActivity.java b/app/src/main/java/com/wbrawner/simplemarkdown/view/activity/SettingsActivity.java deleted file mode 100644 index 3d61fd5..0000000 --- a/app/src/main/java/com/wbrawner/simplemarkdown/view/activity/SettingsActivity.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.wbrawner.simplemarkdown.view.activity; - -import android.os.Bundle; -import android.view.MenuItem; - -import androidx.annotation.Nullable; -import androidx.appcompat.app.AppCompatActivity; - -import com.wbrawner.simplemarkdown.R; - -public class SettingsActivity extends AppCompatActivity { - - @Override - protected void onCreate(@Nullable Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_settings); - setSupportActionBar(findViewById(R.id.toolbar)); - if (getSupportActionBar() != null) { - getSupportActionBar().setDisplayHomeAsUpEnabled(true); - } - } - - @Override - public boolean onOptionsItemSelected(MenuItem item) { - // The only menu item is the back button - setResult(RESULT_OK); - finish(); - return true; - } -} diff --git a/app/src/main/java/com/wbrawner/simplemarkdown/view/activity/SettingsActivity.kt b/app/src/main/java/com/wbrawner/simplemarkdown/view/activity/SettingsActivity.kt new file mode 100644 index 0000000..1cb3b05 --- /dev/null +++ b/app/src/main/java/com/wbrawner/simplemarkdown/view/activity/SettingsActivity.kt @@ -0,0 +1,26 @@ +package com.wbrawner.simplemarkdown.view.activity + +import android.os.Bundle +import android.view.MenuItem +import androidx.appcompat.app.AppCompatActivity + +import com.wbrawner.simplemarkdown.R + +class SettingsActivity : AppCompatActivity() { + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_settings) + setSupportActionBar(findViewById(R.id.toolbar)) + if (supportActionBar != null) { + supportActionBar!!.setDisplayHomeAsUpEnabled(true) + } + } + + override fun onOptionsItemSelected(item: MenuItem): Boolean { + // The only menu item is the back button + setResult(RESULT_OK) + finish() + return true + } +}