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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T10:39:05+00:00 2026-06-10T10:39:05+00:00

I want to know if it’s possible in android to do a form like

  • 0

I want to know if it’s possible in android to do a form like that :

enter image description here

At this moment, I made a shape to produce the border (I use this shape as a background of my linearlayout, but i don’t know how to deal with the text).

Thanks in advance.

  • 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-10T10:39:07+00:00Added an answer on June 10, 2026 at 10:39 am

    I have managed to get a frame with title using the following technique.

    1. Use FrameLayout for the overall layout.

    2. Inside add another layout for your main content – this can be anything. For the background of this layout, use a custom XML drawable with stroke to draw the frame. Make sure to add margins in this layout, especially marginTop, as you need some room to display the title of the frame. Also add some padding to make it look nicer.

    3. Use TextView with opaque background and some paddings as the title. Set marginLeft on it to a reasonable value to offset the title from the left.

    Here’s my XML for this:

    <?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="@android:color/white">
    
        <!--  This is the main content -->
        <RelativeLayout
            android:layout_width="fill_parent" android:layout_height="fill_parent"
            android:layout_margin="15dp" android:background="@drawable/frame"
            android:orientation="vertical" android:padding="20dp">
    
            <TextView android:layout_width="wrap_content" android:layout_height="wrap_content"
                android:text="Main Content" android:layout_centerInParent="true" />
    
        </RelativeLayout>
    
        <!--  This is the title label -->
        <TextView android:layout_width="wrap_content" android:layout_height="wrap_content"
            android:background="@android:color/white" android:padding="5dp"
            android:text="Testing"
            android:layout_marginLeft="30dp" android:textColor="@android:color/black" />
    
    </RelativeLayout>
    

    When executed, I get this on the app:

    enter image description here

    Feel free to tweak the margins/paddings to align the title the way you need.

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

Sidebar

Related Questions

i want know if is possible, to get a specific element value of a
I have an android app it displays web view.I want know the app idle
want to know why String behaves like value type while using ==. String s1
I want to know if there is any kind of report on maven that
I want know the Maximum value of x and y axis such that they
I want know the passed time that also is between two date, for example
I'm a bit new to the C#-form app developing and I want know, what's
hello i am new in android i want know how to iterate child node
I know this is a duplicate question. but i want know it with an
SPI protocal use on MCU & device. I want know if it can use

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.