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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T20:37:36+00:00 2026-05-21T20:37:36+00:00

In my android app I have a login screen. A graphic designer has given

  • 0

In my android app I have a login screen. A graphic designer has given me this template

enter image description here

The closest I was able to get was this

enter image description here

I used a 9.png (temporarily the same as i use for my buttons)

Any ideas how to pull this off with a combinations of layouts and 9.png files ? I don’t want to use a static background image because we want to support all screen sizes…

EDIT : I ended up using two different nine-patch files as the login part also needed to be extendable (the string in the button can vary in length according to phone locale). To put them together i used a relativelayout. I am pretty close to what I wanted to do :

enter image description here

for those interested, here the layout i used (i think i could be simplified) :

<?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="fill_parent"
    android:paddingLeft="15dp" android:paddingRight="15dp"
    android:background="#ffffffff" android:gravity="center"
    android:orientation="vertical">
    <LinearLayout android:id="@+id/login_field_container_top"
        android:orientation="vertical" android:layout_width="fill_parent"
        android:layout_height="wrap_content" android:padding="5dp"
        android:layout_centerInParent="true" android:layout_marginTop="0dp"
        android:layout_marginBottom="-5dp" android:background="@drawable/login_field_container_top">
        <TextView android:layout_height="wrap_content"
            android:layout_width="fill_parent" android:text="@string/email" />
        <EditText android:id="@+id/email" android:layout_width="fill_parent"
            android:layout_height="wrap_content" android:scrollbars="none"
            android:inputType="textEmailAddress" android:singleLine="true"
            android:maxLength="255" />
        <TextView android:layout_height="wrap_content"
            android:layout_width="fill_parent" android:text="@string/password"
            android:layout_margin="5dp" />
        <EditText android:id="@+id/password" android:layout_width="fill_parent"
            android:layout_height="wrap_content" android:scrollbars="none"
            android:password="true" android:singleLine="true" />
    </LinearLayout>
    <RelativeLayout android:layout_width="wrap_content"
        android:layout_height="wrap_content" android:layout_gravity="right">
        <LinearLayout android:id="@+id/login_field_container_bottom"
            android:layout_alignParentRight="true" android:orientation="vertical"
            android:layout_width="wrap_content" android:layout_height="wrap_content"
            android:gravity="center" android:background="@drawable/login_field_container_bottom">
            <LinearLayout android:layout_width="wrap_content"
                android:layout_height="wrap_content" android:padding="1dp"
                android:layout_margin="1dp" android:layout_gravity="center"
                android:gravity="center" android:background="@drawable/small_button_holder">
                <Button android:id="@+id/login_button" android:text="@string/login"
                    android:layout_margin="0dp" android:layout_width="wrap_content"
                    android:layout_height="wrap_content" />
            </LinearLayout>
        </LinearLayout>
        <LinearLayout android:orientation="horizontal"
            android:layout_width="wrap_content" android:layout_height="wrap_content"
            android:paddingBottom="10dp" android:layout_toLeftOf="@id/login_field_container_bottom"
            android:layout_alignBottom="@id/login_field_container_bottom">
            <TextView android:layout_width="wrap_content"
                android:layout_height="wrap_content" android:text="@string/notamember"
                style="@style/Subtitle" />
            <Button android:id="@+id/register" android:text="@string/register"
                android:layout_width="wrap_content" android:layout_height="wrap_content" />
        </LinearLayout>
    </RelativeLayout>
</LinearLayout>

The only part I am not happy about is I had to add padding to align the left and right button

  • 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-21T20:37:36+00:00Added an answer on May 21, 2026 at 8:37 pm

    Have your designer cut you a nine-patch with the login tab as part of the non stretched area, but still part of the content area. Stretch that across the whole screen, and then just position the buttons relative to the parent.

    9-patch

         *********************
         _____________________
        /                     \
    *   |                     |  X
    *   |                     |  X
    *   \_______________      |  
    *                   |     |  
    *                   |_____|
          XXXXXXXXXXXX
    
    * = content area
    X = stretchable area
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

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.