This app tracks my workout routine and I wanted to share it with a few friends, so I need to make a button to add additional exercises. Currently I have an actionbar with the + button as per below, that expands to an editText field when pressed.
Problem #1: The editText field seems to be set to wrap_Content, I would rather it fill remaining space but I have no idea how. It's been implemented like this;
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/menu_create"
android:title="@string/menu_create"
android:showAsAction="ifRoom|collapseActionView"
android:actionViewClass="android.widget.EditText" />
</menu>
Problem #2: I need a button to appear as well that can be pressed once the name of the exercise has been typed in. So far I've had no luck figuring out how to do this. I'm just using the Android Dev Guide, I haven't been able to google anything that comes close to what I'm after...
Am I on the right track? If so, any tips/hints on how to add the button and fix up the editText field? If not, any suggestions for other ways to implement? (obviously a whole new activity is a bit of overkill...)