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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T17:05:07+00:00 2026-06-09T17:05:07+00:00

Here is my Code <RelativeLayout android:id=@+id/layout android:layout_width=wrap_content android:layout_height=wrap_content > <ImageView android:id=@+id/black_strip_top android:layout_width=wrap_content android:layout_above=@id/left_strip android:layout_height=2dp

  • 0

Here is my Code

<RelativeLayout
    android:id="@+id/layout"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content" >

    <ImageView
        android:id="@+id/black_strip_top"
        android:layout_width="wrap_content"
        android:layout_above="@id/left_strip"
        android:layout_height="2dp"
        android:background="@color/black" />

    <ImageView
        android:id="@+id/black_strip_below"
        android:layout_width="wrap_content"
        android:layout_below="@id/left_strip"
        android:layout_height="2dp"
        android:background="@color/black" />

    <ImageView
        android:id="@+id/left_strip"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@drawable/left_strip" />

    <ImageView
        android:id="@+id/right_strip"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_toRightOf="@id/image"
        android:src="@drawable/right_strip" />

    <ImageView
        android:id="@+id/image"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:scaleType="fitXY" />

</RelativeLayout>

I want to have a black strip of 2dp at top and below of the image. But i am not able to get it. Please help me out.

  • 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-09T17:05:09+00:00Added an answer on June 9, 2026 at 5:05 pm

    Your @+id/black_strip_top is above @+id/image but that not means that @+id/image will be below @+id/black_strip_top. It looks a riddle but is basically your problem. This is a possible solution:

    <RelativeLayout
        android:id="@+id/layout"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" >
    
        <ImageView
            android:id="@+id/black_strip_top"
            android:layout_width="wrap_content"
            android:layout_height="2dp"
            android:layout_alignLeft="@+id/left_strip"
            android:layout_alignRight="@+id/right_strip"
            android:background="@color/black" />
    
        <ImageView
            android:id="@+id/black_strip_below"
            android:layout_width="wrap_content"
            android:layout_height="2dp"
            android:layout_alignLeft="@+id/left_strip"
            android:layout_alignRight="@+id/right_strip"
            android:layout_below="@+id/image"
            android:background="@color/black" />
    
        <ImageView
            android:id="@+id/left_strip"
            android:layout_width="2dp"
            android:layout_height="wrap_content"
            android:layout_alignBottom="@+id/image"
            android:layout_alignTop="@+id/image"
            android:background="@color/black" />
        <!-- android:src="@drawable/left_strip" -->
    
        <ImageView
            android:id="@+id/right_strip"
            android:layout_width="2dp"
            android:layout_height="wrap_content"
            android:layout_alignBottom="@+id/image"
            android:layout_alignTop="@+id/image"
            android:layout_toRightOf="@+id/image"
            android:background="@color/black" />
        <!-- android:src="@drawable/right_strip" -->
    
        <ImageView
            android:id="@+id/image"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/black_strip_top"
            android:layout_toRightOf="@+id/left_strip"
            android:scaleType="fitXY"
            android:src="@drawable/app_icon" />
    </RelativeLayout>
    

    Other option could be to use a GridView instead of RelativeLayout

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

Sidebar

Related Questions

I have this ImageView block inside a Relative layout: <ImageView android:layout_width=wrap_content android:layout_height=wrap_content android:layout_alignParentBottom=true android:layout_marginBottom=50dip
My xml code is here, <?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:id=@+id/mainlayout > <LinearLayout
here's my code for main.xml <merge xmlns:android=http://schemas.android.com/apk/res/android> <RelativeLayout android:id=@id/container android:layout_width=fill_parent android:layout_height=fill_parent xmlns:android=http://schemas.android.com/apk/res/android> <include layout=@layout/tabs
<RelativeLayout android:layout_width=fill_parent android:layout_height=fill_parent <TextView android:id=@+id/tv_test android:text=Test android:layout_width=wrap_content android:layout_height=wrap_content /> <ListView android:id=@+id/list_test android:layout_width=fill_parent android:layout_height=fill_parent android:layout_below=@id/tv_test
I am using Radio Buttons inside a relative layout, here is my code <RelativeLayout
Here my code, I need to insert into mysql database I have mysql,php,android 1)
The script is on jsfiddle here : CODE What it does at the moment
Ok the error is showing up somewhere in this here code if($error==false) { $query
Here is code my jqgrid editing through form. $(#DataEnergy).jqGrid('navGrid', '#pagergrid', {}, //options {editdata: {
Here is code from MSDN . I don't understand why the work isn't just

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.