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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T16:17:18+00:00 2026-06-08T16:17:18+00:00

i design a login view. I want to insert a fragment layout which is

  • 0

i design a login view. I want to insert a fragment layout which is placed at the center of parent view. I hard code to input some fragment layout to make this effect. But, does there exist better way to do this.

This is my layout:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >

<FrameLayout 
    android:layout_width="match_parent"
    android:layout_height="0px"
    android:layout_weight="1">
</FrameLayout>

<LinearLayout 
    android:layout_width="match_parent"
    android:layout_height="0px"
    android:layout_weight="2"
    android:orientation="horizontal">

    <FrameLayout 
        android:layout_width="0px"
        android:layout_height="match_parent"
        android:layout_weight="1">
    </FrameLayout>

    <FrameLayout 
        android:layout_width="0px"
        android:layout_height="match_parent"
        android:layout_weight="2">
    </FrameLayout>

    <FrameLayout
            android:id="@+id/login_frame" 
        android:layout_width="0px"
        android:layout_height="match_parent"
        android:layout_weight="1">
    </FrameLayout>


</LinearLayout>

<FrameLayout 
    android:layout_width="match_parent"
    android:layout_height="0px"
    android:layout_weight="1">
</FrameLayout>

</LinearLayout>

Thanks you.

  • 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-08T16:17:20+00:00Added an answer on June 8, 2026 at 4:17 pm
    <TableLayout xmlns:android="http://schemas.android.com/apk/res/android"    
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"       
    android:gravity="center_vertical">
    
    <TableRow
        android:id="@+id/row1"
        android:layout_marginTop="25dp"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content">
    
        <TextView
            android:id="@+id/txtUserName"
            android:layout_marginLeft="50dp"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:padding="2dp"                
            android:text="Username"
            android:textSize="16sp" />
    </TableRow>
    
    <TableRow
        android:id="@+id/row2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content">
        <EditText
            android:inputType="text"
            android:id="@+id/editUsername"
            android:layout_width="fill_parent"
            android:layout_height="40dp"
            android:layout_weight="2"
            android:singleLine="true"
            android:layout_marginLeft="50dp"
            android:layout_marginTop="2dip"
            android:layout_marginRight="50dp"   
            android:padding="10dp"/>
    </TableRow>
    <TableRow
        android:id="@+id/row3"
        android:layout_marginTop="5dp"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" >
    
        <TextView
            android:id="@+id/txtPassword"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:padding="2dp"
            android:layout_marginLeft="50dp"
            android:text="password"               
            android:textSize="16sp" />
    </TableRow> 
    <TableRow
        android:id="@+id/row4"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content">   
        <EditText
            android:inputType="textPassword"
            android:id="@+id/editPassword"
            android:layout_width="fill_parent"
            android:layout_height="40dp"
            android:layout_weight="2"      
            android:layout_marginTop="2dip"
            android:layout_marginRight="50dp"   
            android:layout_marginLeft="50dp"        
            android:padding="10dp"
            android:password="true"                
            android:singleLine="true"/>
    </TableRow>
    <TableRow
        android:id="@+id/row5"          
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" >
        <CheckBox
            android:id="@+id/chkRememberPassword"
            android:layout_width="wrap_content"      
            android:layout_height="wrap_content"            
            android:layout_marginLeft="52dp"
            android:padding="10dp" 
            android:textSize="15sp"
            android:text="rememberme"
            />
    </TableRow>
    <TableRow
        android:id="@+id/row6"            
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" >
    
        <Button
            android:id="@+id/login"
            android:layout_width="100dp"
            android:layout_height="35dp"
            android:text="login"
            android:textStyle="bold"
            android:layout_marginLeft="102dp"/>
    </TableRow>     
    

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

Sidebar

Related Questions

I want to design a login and register layout using android tabs. Image is
I want to design a webpage login that when click on the login button
I'm doing some design/debugging in IRB and need to login a user and then
I am new to the iPhone development.I want to design a login form for
Design wise and performance wise which approach is recommended for handling multiple Zeromq sockets
I have read a lot about MVC design pattern, but some of the things
I want to ask you about programming aspect , I embedded java code inside
Screenshot 1: https://skitch.com/android86/fm4r7/dreamweaver ( HTML design view) Screenshot 2: https://skitch.com/android86/fm4fd/dreamweaver ( CSS) In the
I'm building an application using the MVVM design pattern and I want to make
I want to attempt an MVC design for my little app. I have 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.