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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:28:59+00:00 2026-06-17T23:28:59+00:00

This is my first android application, I face a bunch of problems. I want

  • 0

This is my first android application, I face a bunch of problems. I want to make a design like in this image:

desired layout

I tried many solutions to do it, but nothing work.
This is my code:

<TableLayout
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            >
<View
            android:layout_height="2dip"
            android:background="@color/dark_blue"/>
        <!--Product information-->
        <TableRow android:id="@+id/product_info">
            <ImageView android:id="@+id/product_img"
                       android:src="@drawable/mdpi_product_verify_scan_code"
                       android:layout_width="fill_parent"
                       android:layout_height="fill_parent"
                       android:layout_weight="1"
                    />
            <TextView android:id="@+id/tvdesc"
                      android:layout_width="fill_parent"
                      android:layout_height="fill_parent"
                      android:layout_weight="2"
                      android:text="description description description "
                      android:textColor="@color/black"
                    />
        </TableRow>

<View
            android:layout_height="2dip"
            android:background="@color/dark_blue"/>

        <!--Images button-->
        <TableRow
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                >
            <TextView
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:text="Product Description"
                    android:textColor="@color/black"
                    android:textAppearance="?android:textAppearanceMedium"
                    />
            <FrameLayout
                    android:background="@color/dark_blue"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:layout_gravity="top|left"
                    android:padding="5dp">
            <ImageButton
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:src="@drawable/mdpi_btn_show_images_icon"
                    android:background="@android:color/transparent"
                    />
                <TextView
                        android:layout_width="fill_parent"
                        android:layout_height="wrap_content"
                    android:text="Images"/>
            </FrameLayout>
        </TableRow>

        <TableRow android:id="@+id/product_info">
            <ImageView android:id="@+id/ima"
                       android:src="@drawable/mdpi_product_verify_scan_code"
                       android:layout_width="fill_parent"
                       android:layout_height="fill_parent"
                       android:layout_weight="1"
                    />
            <TextView android:id="@+id/tv2"
                      android:layout_width="fill_parent"
                      android:layout_height="fill_parent"
                      android:layout_weight="2"
                      android:text="description description description "
                      android:textColor="@color/black"
                    />
        </TableRow>

        <!--Verification -->
        <TableRow
                android:layout_width="wrap_content"
                android:layout_height="wrap_content">
            <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                android:text="product verification"
                android:textAppearance="?android:textAppearanceMedium"
                android:textColor="@color/green"/>
        </TableRow>
        <TableRow
                android:layout_width="wrap_content"
                android:layout_height="wrap_content">
            <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="This product can be verified. Tap on the VERIFY PRODUCT button above."
                    android:textColor="@color/green"/>
        </TableRow>
        
    </TableLayout>

and this the result

The result

as you can see, all the elements are messed up
and the images button disappear also when i set the gravity left the images disappear and the text stay where they are, nothing change.

This image shows what are the problems:
problem markers

  1. How to make each text on a row.
  2. Set the image at the left (the gravity left didn’t work)
  3. How to draw a vertical line?
  4. How can i put image with the text?( i was using the span but it’s work just for one row here i have two text rows, is there anyway to merge two vertical cells).
  5. The images button disappear.

Thanks for any help.

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

    I guess this should help you a bit understand how it works. I manage to do something that looks like what you might need

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical" >
    
        <Space
            android:layout_width="match_parent"
            android:layout_height="10dp" />
    
        <Button
            android:id="@+id/button1"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="Tap to Verify Product" />
    
        <Space
            android:layout_width="match_parent"
            android:layout_height="10dp" />
    
        <View
            android:layout_width="fill_parent"
            android:layout_height="1dp"
            android:background="@android:color/darker_gray" />
    
        <Space
            android:layout_width="match_parent"
            android:layout_height="10dp" />
    
        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="80dp" >
    
            <ImageView
                android:id="@+id/imageView1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentLeft="true"
                android:layout_alignParentTop="true"
                android:layout_marginLeft="20dp"
                android:layout_marginTop="16dp"
                android:src="@drawable/ic_launcher" />
    
            <View
                android:id="@+id/view1"
                android:layout_width="1dp"
                android:layout_height="fill_parent"
                android:layout_alignParentTop="true"
                android:layout_marginLeft="22dp"
                android:layout_toRightOf="@+id/imageView1"
                android:background="@android:color/darker_gray" />
    
            <TextView
                android:id="@+id/textView3"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignBottom="@+id/imageView1"
                android:layout_alignLeft="@+id/textView2"
                android:text="TextView" />
    
            <TextView
                android:id="@+id/textView2"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_above="@+id/textView3"
                android:layout_alignLeft="@+id/textView1"
                android:text="TextView" />
    
            <TextView
                android:id="@+id/textView1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_above="@+id/textView2"
                android:layout_marginLeft="21dp"
                android:layout_toRightOf="@+id/view1"
                android:text="TextView" />
        </RelativeLayout>
    
        <Space
            android:layout_width="match_parent"
            android:layout_height="10dp" />
    
        <View
            android:layout_width="fill_parent"
            android:layout_height="1dp"
            android:background="@android:color/darker_gray" />
    
        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="46dp" >
    
            <TextView
                android:id="@+id/textView4"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentLeft="true"
                android:layout_alignParentTop="true"
                android:layout_marginLeft="22dp"
                android:text="Large Text"
                android:textAppearance="?android:attr/textAppearanceLarge" />
    
            <ImageView
                android:id="@+id/imageView2"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentRight="true"
                android:layout_alignParentTop="true"
                android:layout_marginRight="20dp"
                android:src="@drawable/ic_launcher" />
    
        </RelativeLayout>
    
        <ImageView
            android:id="@+id/imageView3"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:src="@drawable/ic_launcher" />
    
        <TextView
            android:id="@+id/textView5"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:text="TextView" />
    
    </LinearLayout>
    

    Try it out in your IDE and from that, if you need further helps, I’ll see what I can do.

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

Sidebar

Related Questions

I've followed this tutorial: http://anandhansubbiah.com/blog/writing-your-first-android-application/ , but no matter what I do, and what
How to create in-app step by step instructions? Like this ( first boot android
I'm developing my first Android application, and I'd like to create a settings screen.
Background: I have started Android recently. I want to make an application for Android
This is the first time I'm developing an Android application so this question might
First things, first, I'm just starting with Android Application Development and would like to
I am writing my first Android application, and I have been struggling with this
Hey guys. I've just published my first Android application to show this guy who
In android application when second activity is being called from first one i want
I develop my first android application. This is pretty simple app. It has 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.