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 8411115
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T00:21:33+00:00 2026-06-10T00:21:33+00:00

I am transferring an old program over to a Tabs and Fragments implementation. The

  • 0

I am transferring an old program over to a Tabs and Fragments implementation. The user inputs an Id for a search and then hits Submit. However my “Submit Button” does nothing.

I have tried several alternative coding variants but get same result – dead air!

Here is XML

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/setUpAthletesTab"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" 
     android:background="#CCFFFF" >

    <TextView
        android:id="@+id/instructionText"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    android:text="@string/instructionText"
    android:textColor="#FF0000"
    android:textAppearance="?android:attr/textAppearanceMedium"
     />

    <TableRow
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="left"
        android:stretchColumns="*" >

        <EditText
            android:id="@+id/editTextAthlete0"
            android:layout_width="145dp"
            android:layout_height="wrap_content"
            android:layout_marginTop="5dp"
            android:hint="@string/hintText"
            android:inputType="number" />

        <TextView
            android:id="@+id/textAthleteName0"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical"
            android:layout_marginLeft="5dp"
            android:hint="@string/athleteHintName0"
            android:textAppearance="?android:attr/textAppearanceLarge" />
    </TableRow>

Here is my Tab / Fragment

public class Tab3Fragment extends Fragment {

    /* (non-Javadoc)
     * @see android.support.v4.app.Fragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle)
     */
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
            Bundle savedInstanceState) {
        /* Begin Insertion */
        LayoutInflater myInflater = inflater;
        ViewGroup myContainer = container;
        if(inflater == null) myInflater = inflater;
        if(container == null) myContainer = container;
        Log.d(APP_TAG,"At line 50 of Tab3Fragment myInflater = " + myInflater + " and myContainer = " + myContainer);
        getAthleteInfoFromExistingDatabase(myInflater,myContainer);

        LinearLayout tab3LinearLayout = (LinearLayout) inflater.inflate(R.layout.tab_frag3_layout, container, false);

        View mySubmitButton = tab3LinearLayout.findViewById(R.id.submitButton);
        ((Button) mySubmitButton).setOnClickListener(new OnClickListener() {

            @Override
            public void onClick(View v) {

                Toast.makeText(Tab3Fragment.this.getActivity().getBaseContext(),
                        "clicked on Submit Button", Toast.LENGTH_LONG).show();

                Intent intent = new Intent();
                intent.setClass(getActivity(), RetrieveAthleteData.class);
                startActivity(intent);
            }
        });

        return (LinearLayout)inflater.inflate(R.layout.tab_frag3_layout, container, false);
    }

Neither the Toast box nor the Intent fire off when I hit submit.

Thanks for looking at my question.

Problem solved! Thanks Dirk for suggesting name change to all lower case.

  • 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-10T00:21:35+00:00Added an answer on June 10, 2026 at 12:21 am

    In your xml is no Button with the id “submitButton”.

    You should only use lowercase and therefore give it the id “@+id/submit_button”

    Although I could not find a source that camel case ids are not allowed. Even Google uses camel case ids in their examples sometimes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been using the Bluetooth chat example for transferring data over Bluetooth from
I am transferring a program from java to Objective C and need to use
I'm having issues transferring lazy loaded data over the wire using WCF and NHibernate.
Sorry to ask all, but I'm an old hand Vb.net guy who's transferring to
I'm transferring a reasonably large image over a local network from an iPhone to
I am transferring data from FirstView to SecondView after clicking on a button. FirstView.h
I have an old C++ program that is writing files and FTPing them to
I am transferring data over to a slave device from an iPhone where the
We are currently transferring our websites from Windows 2003 (32-bit) to Windows 2008 (64-bit)
I have been transferring this script (http://jsfiddle.net/darkajax/FHZBy/) in to my live environment within a

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.