aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/enums/OverlayContext.kt
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/enums/OverlayContext.kt')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/enums/OverlayContext.kt25
1 files changed, 21 insertions, 4 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/enums/OverlayContext.kt b/app/src/main/kotlin/com/pitchedapps/frost/enums/OverlayContext.kt
index f93a2229..d529db12 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/enums/OverlayContext.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/enums/OverlayContext.kt
@@ -1,3 +1,19 @@
+/*
+ * Copyright 2018 Allan Wang
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
package com.pitchedapps.frost.enums
import android.content.Context
@@ -52,12 +68,13 @@ enum class OverlayContext(private val menuItem: FrostMenuItem?) : EnumBundle<Ove
* Frame for an injectable menu item
*/
class FrostMenuItem(
- val id: Int,
- val fbItem: FbItem,
- val showAsAction: Int = MenuItem.SHOW_AS_ACTION_IF_ROOM) {
+ val id: Int,
+ val fbItem: FbItem,
+ val showAsAction: Int = MenuItem.SHOW_AS_ACTION_IF_ROOM
+) {
fun addToMenu(context: Context, menu: Menu, index: Int) {
val item = menu.add(Menu.NONE, id, index, fbItem.titleId)
item.icon = fbItem.icon.toDrawable(context, 18)
item.setShowAsAction(showAsAction)
}
-} \ No newline at end of file
+}