Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8991409
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T22:43:11+00:00 2026-06-15T22:43:11+00:00

This app tracks my workout routine and I wanted to share it with a

  • 0

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.

Image that I'm not allowed to post due to low rep...

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…)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T22:43:12+00:00Added an answer on June 15, 2026 at 10:43 pm

    Thanks for the tip @Gunnar Karlsson , a custom layout did the job for me. To be specific;

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal" >
    
        <EditText
            android:id="@+id/exerciseInput"
            android:layout_width="0dip"
            android:layout_height="wrap_content"
            android:inputType="text"
            android:layout_weight="1" >
            <requestFocus />
        </EditText>
    
        <Button
            android:id="@+id/addExerciseButton"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/exerciseadd" />
    </LinearLayout>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In this app I want that as I click on button the data from
When the users of this app make changes to the fields a large amount
So im making this app where user could add UP to 3 images to
This one has me stumped. I'm writing an iPhone app that tracks bus schedules.
I’m working on an in-house app that tracks a bunch of tasks. I wanted
This app displays a form with a textbox where the user is supposed to
This app I completed around a year ago (!) but never launched it on
I am writing this app in windows form c#. When user exit from this
So I have this app which needs to query entities from the Azure Tables
So I have this App in the store, and I would like to release

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.