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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:18:32+00:00 2026-05-27T04:18:32+00:00

i need to create a login screen in android that will look like this.

  • 0

i need to create a login screen in android that will look like this.
enter image description here

I have white rectangle image but that image is bigger than screen.
So whenever i am applying that image to linearlayout(that has edittext and button).linearlayout fills complete screen.

I know its a very beginner question but how can i make this screen?
and i also want that that white image should work on every

  • 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-05-27T04:18:33+00:00Added an answer on May 27, 2026 at 4:18 am

    You need to create some drawables (XML), 1 for the background (so you can add the round corners) and another 1 for the button where you will add the gradient and stroke.

    EDIT: Added an example.

    Result:

    Result Image

    Layout.xml

    <?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:background="#d4d4d4" >
    
        <LinearLayout
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="4dp"
            android:layout_marginRight="4dp"
            android:layout_marginTop="15dp"
            android:background="@drawable/round_borders"
            android:orientation="vertical"
            android:paddingTop="40dp" >
    
            <EditText
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginBottom="10dp"
                android:paddingBottom="0dp"
                android:paddingTop="0dp"
                android:singleLine="true"
                android:text="username" />
    
            <EditText
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginBottom="10dp"
                android:paddingBottom="0dp"
                android:paddingTop="0dp"
                android:singleLine="true"
                android:text="password" />
    
            <Button
                style="@style/OrangeButtons"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="40dp"
                android:gravity="center"
                android:paddingBottom="3dp"
                android:paddingTop="3dp"
                android:text="Log in" />
        </LinearLayout>
    </RelativeLayout>
    

    @style/OrangeButtons

    <style name="OrangeButtons">
        <item name="android:gravity">center</item>
        <item name="android:textColor">#FFFFFF</item>
        <item name="android:focusable">true</item>
        <item name="android:background">@drawable/orange_button</item>
    </style>
    

    @drawable/orange_button

    <?xml version="1.0" encoding="utf-8"?>
    <selector
        xmlns:android="http://schemas.android.com/apk/res/android">
    
        <item android:state_pressed="true" >
            <shape>
                <gradient
                    android:startColor="#f29d00"
                    android:endColor="#d96c00"
                    android:angle="270" />
                <stroke
                    android:width="1dp"
                    android:color="#fade96" />
                <corners
                    android:radius="15dp" />
                <padding
                    android:left="10dp"
                    android:top="10dp"
                    android:right="10dp"
                    android:bottom="10dp" />
            </shape>
        </item>
    
        <item android:state_focused="true" >
            <shape>
                <gradient
                    android:endColor="#f29d00"
                    android:startColor="#d96c00"
                    android:angle="270" />
                <stroke
                    android:width="1dp"
                    android:color="#fade96" />
                <corners
                    android:radius="15dp" />
                <padding
                    android:left="10dp"
                    android:top="10dp"
                    android:right="10dp"
                    android:bottom="10dp" />
            </shape>
        </item>
    
        <item>        
            <shape>
                <gradient
                    android:endColor="#f29d00"
                    android:startColor="#d96c00"
                    android:angle="90" />
                <stroke
                    android:width="1dp"
                    android:color="#fade96" />
                <corners
                    android:radius="15dp" />
                <padding
                    android:left="10dp"
                    android:top="10dp"
                    android:right="10dp"
                    android:bottom="10dp" />
            </shape>
        </item>
    </selector>
    

    @drawable/round_borders

    <?xml version="1.0" encoding="utf-8"?>
    <shape xmlns:android="http://schemas.android.com/apk/res/android">
        <solid android:color="@android:color/white" />
        <padding android:left="20dp" android:top="35dp"
                android:right="20dp" android:bottom="15dp" />
        <corners android:radius="8dp" />
    </shape>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a login screen that I force to be ssl, so like this:
I need to create an XML schema that looks something like this: <xs:element name=wrapperElement>
I need to create a cherrypy main page that has a login area. I
I am new to C#. I have created the login screen.I this one am
Need to create a custom DNS name server using C which will check against
I need to create a backup of a SQL Server 2005 Database that's only
I need to create a 2D int array of size 800x800. But doing so
I am trying to create a thread to handle a login function that is
I need to create a wordpress plugin to connect wordpress to a central login.
I need to create a secure sign up/login page for my website. I am

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.