From ae0e6ec634d8ab515ae381145a89d9ce649ba082 Mon Sep 17 00:00:00 2001 From: evgenyzinoviev Date: Fri, 14 Aug 2015 17:11:48 +0300 Subject: initial --- .../happysanta/gd/Menu/EmptyLineMenuElement.java | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100755 src/org/happysanta/gd/Menu/EmptyLineMenuElement.java (limited to 'src/org/happysanta/gd/Menu/EmptyLineMenuElement.java') diff --git a/src/org/happysanta/gd/Menu/EmptyLineMenuElement.java b/src/org/happysanta/gd/Menu/EmptyLineMenuElement.java new file mode 100755 index 0000000..e0901f9 --- /dev/null +++ b/src/org/happysanta/gd/Menu/EmptyLineMenuElement.java @@ -0,0 +1,42 @@ +package org.happysanta.gd.Menu; + +import android.view.View; +import android.view.ViewGroup; +import org.happysanta.gd.Menu.Views.MenuTextView; + +import static org.happysanta.gd.Helpers.getDp; +import static org.happysanta.gd.Helpers.getGDActivity; + +public class EmptyLineMenuElement implements MenuElement { + + protected String text; + protected int offset; + protected MenuTextView view; + + EmptyLineMenuElement(int offset) { + this.offset = offset; + + view = new MenuTextView(getGDActivity()); + view.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, getDp(offset))); + } + + @Override + public View getView() { + return view; + } + + @Override + public boolean isSelectable() { + return false; + } + + @Override + public void setText(String s) { + text = s; + } + + @Override + public void performAction(int k) { + } + +} -- cgit v1.2.3