diff --git a/app/src/main/java/net/helcel/beendroid/activity/EditActivity.kt b/app/src/main/java/net/helcel/beendroid/activity/EditActivity.kt
index 3c7c9dd..73b8445 100644
--- a/app/src/main/java/net/helcel/beendroid/activity/EditActivity.kt
+++ b/app/src/main/java/net/helcel/beendroid/activity/EditActivity.kt
@@ -1,12 +1,17 @@
package net.helcel.beendroid.activity
import android.os.Bundle
+import android.view.MenuItem
import androidx.appcompat.app.AppCompatActivity
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import net.helcel.beendroid.R
+import net.helcel.beendroid.activity.fragment.AboutFragment
+import net.helcel.beendroid.activity.fragment.LicenseFragment
+import net.helcel.beendroid.activity.fragment.SettingsFragment
import net.helcel.beendroid.countries.Visited
import net.helcel.beendroid.countries.World
+import net.helcel.beendroid.helper.colorPrimary
class EditActivity : AppCompatActivity() {
@@ -19,6 +24,11 @@ class EditActivity : AppCompatActivity() {
setContentView(R.layout.activity_edit)
+ // Create action bar
+ supportActionBar?.setBackgroundDrawable(colorPrimary(this))
+ supportActionBar?.title = getString(R.string.action_edit)
+ supportActionBar?.setDisplayHomeAsUpEnabled(true)
+
visited = Visited(this)
visited.load()
@@ -27,4 +37,11 @@ class EditActivity : AppCompatActivity() {
list.adapter = FoldingListAdapter(this, World.WWW.children, visited) { }
}
+ override fun onOptionsItemSelected(item: MenuItem): Boolean {
+ // Configure on back pressed
+ finish()
+ return super.onOptionsItemSelected(item)
+ }
+
+
}
\ No newline at end of file
diff --git a/app/src/main/java/net/helcel/beendroid/activity/MainActivity.kt b/app/src/main/java/net/helcel/beendroid/activity/MainActivity.kt
index d7e8978..f7a76cc 100644
--- a/app/src/main/java/net/helcel/beendroid/activity/MainActivity.kt
+++ b/app/src/main/java/net/helcel/beendroid/activity/MainActivity.kt
@@ -103,7 +103,7 @@ class MainActivity : AppCompatActivity() {
opt.css(css.get())
}
photoView.setImageLevel(1)
- photoView.setImageDrawable(PictureDrawable(psvg.getFill().renderToPicture(opt)))
+ photoView.setImageDrawable(PictureDrawable(psvg.get().renderToPicture(opt)))
}
}
\ No newline at end of file
diff --git a/app/src/main/java/net/helcel/beendroid/svg/PSVGWrapper.kt b/app/src/main/java/net/helcel/beendroid/svg/PSVGWrapper.kt
index ed80d45..5350c27 100644
--- a/app/src/main/java/net/helcel/beendroid/svg/PSVGWrapper.kt
+++ b/app/src/main/java/net/helcel/beendroid/svg/PSVGWrapper.kt
@@ -44,12 +44,8 @@ class PSVGWrapper(ctx: Context) {
}.fold("") { acc, e -> acc + e }
}
- fun getFill(): SVG {
- return SVG.getFromString("")
- }
-
- fun getDraw(): SVG {
- return SVG.getFromString("")
+ fun get(): SVG {
+ return SVG.getFromString("")
}
}
\ No newline at end of file