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

  • Home
  • SEARCH
  • 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 8796367
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:36:22+00:00 2026-06-13T23:36:22+00:00

I have a big ‘Log in’ button on my app. When the user taps

  • 0

I have a big ‘Log in’ button on my app. When the user taps this button, I want to replace the text with ‘Logging in…’, align it to the left instead of center and put a spinning circle on the right (but still inside the button). I’d like to use essentially the same button (but with different initial and loading text) in other places in my app.

What’s the neatest way to do this? For the actual spinning graphic, I was planning to use the @drawable/spinner_white_16 that comes with Android.

Thanks.

  • 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-13T23:36:23+00:00Added an answer on June 13, 2026 at 11:36 pm

    You can create your own button using a RelativeLayout containing a TextView and an ImageView.

    <RelativeLayout android:id="@+id/login"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        onClick="[yourLoginMethod]" >
    
        <TextView android:id="@+id/login_text"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:text="Log In" />
    
        <ImageView android:id="@+id/login_loading"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_toRightOf="@id/login_text"
            android:visibility="gone" />
    
    </RelativeLayout>
    

    And then in whatever your login method is called, change the contents of the TextView, make it align parent right, and set the ImageView visibility to visible.

    loginText.setText("Logging In...");
    LayoutParams params = loginText.getLayoutParams();
    params.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
    loginText.setLayoutParams(params);
    loginLoading.setVisibility(View.VISIBLE);
    

    And then I would also have some code that reverses those changes if the login fails.

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

Sidebar

Related Questions

I have big DataTable I want to get subset of this DataTable represented as
I have big problem when I am trying to deploy my app over clickonce.
I have big set of urls and I want to implement an autocompletion. I
I have big process running. It spawns two threads. I want to debug those
I have big troubles dealing with a website I want to make a searchfunction
I have big collection of tweets stored in MongoDB. Tweets look like this one:
I have big problems with stopping a service, which plays audio file. I want
I have big content. get by file_get_content. It like this: <div class=nwsdetail> <div class=othernws>
i have big table with many html items such as select, textbox, radio-button, checkbox.
im developing a metro app for windows 8 and I have big difficulties to

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.