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

The Archive Base Latest Questions

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

Currently I have following layout: <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:id=@+id/editorRootView android:layout_width=fill_parent android:layout_height=fill_parent android:orientation=vertical > <RelativeLayout android:id=RL1

  • 0

Currently I have following layout:

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

    <RelativeLayout android:id="RL1"
            android:layout_width="fill_parent"
            android:layout_height="0dip"
            android:layout_weight="1">
        <!-- LinearLayout needed so we have an border outside of the EditorView -->
        <LinearLayout android:id="LL1"
            android:background="@drawable/border"
            android:layout_centerInParent="true"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" >

            <xenolupus.EditorView
                android:id="@+id/editorView"
                android:layout_width="300dip"
                android:layout_height="216dip" />
        </LinearLayout>
    </RelativeLayout>
    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_margin="10dip"
        android:orientation="horizontal" >
        <Button
            android:id="@+id/otherImage"
            android:layout_width="150dip"
            android:layout_height="60dip"
            android:text="@string/cardEditor_OtherImageButtonText" />
        <Button
            android:id="@+id/next"
            android:layout_width="150dip"
            android:layout_height="60dip"
            android:text="@string/cardEditor_NextButtonText" />
    </LinearLayout>
</LinearLayout>

And the used @drawable/border:

<?xml version="1.0" encoding="UTF-8"?>
<shape 
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">
    <solid 
        android:color="#FFFFFF" />
    <stroke 
        android:width="10dip" 
        android:color="#FF0099CA" />
    <padding 
        android:left="10dip" 
        android:top="10dip" 
        android:right="10dip"
        android:bottom="10dip" />
    <corners 
        android:radius="5dip" />
</shape>

However Eclipse warns me (yellow triangle with !) that the LinearLayout LL1 in the RelativeLayout RL1 is useless and should be removed:

This LinearLayout layout or its RelativeLayout parent is useless;
transfer the background attribute to the other view.

As the RelativeLayout is needed to center the EditorView I tried removing the LinearLayout LL1 and adding the android:background of the LinearLayout LL1 to the EditorView. However doing lets the border disappear behind the content of the EditorView.

Is there another way to add a border outside of the EditorView or should I just ignore the warning?

Greetings
Xeno Lupus

  • 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:55:22+00:00Added an answer on June 9, 2026 at 5:55 pm
        yes it's right, put the background inside your <xenolupus.EditorView 
            like this    
    <xenolupus.EditorView
                        android:background="@drawable/border"
                        android:padding="10dp"
                        android:id="@+id/editorView"
                        android:layout_width="300dip"
                        android:layout_height="216dip" />
    
        and then  add gravity to it parent the RL1 layout  
    
        > android:gravity="center"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following Custom Component: <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=fill_parent android:layout_height=@dimen/bottom_actionbar_item_height android:orientation=horizontal android:gravity=center> <Button android:id=@+id/btnLogin
I have the following application.xml <?xml version=1.0 encoding=utf-8?> <manifest xmlns:android=http://schemas.android.com/apk/res/android package=com.currency.mobile.android> <uses-permission android:name=android.permission.INTERNET/> <application
I have a TextView in ScrollView: <?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:id=@+id/parentLayout android:layout_width=fill_parent android:layout_height=fill_parent
Currently I have the following resource folders: 1. layout-sw600dp 2. layout-sw600dp-notlong The idea is
Currently I have following XML: <Rowsets> <Rowset> <Row> <DrilldownDepth>0</DrilldownDepth> <ScheduleWeek>---</ScheduleWeek> <ABC>---</ABC> <PQR>1500</PQR> <XYZ>15000</XYZ> <Quant>285</Quant>
I currently have the following controller method in a Rails app: def index @entries
I currently have the following SQL query that lists all the names of all
I currently have the following Get-ChildItem -recurse -include file.ext | Select-String -pattern c: |
I currently have the following htaccess rewrite rule: RewriteRule (.*) index.php/$1 [L] How do
I currently have the following CSS (called splash.css): html { background:url(splash.jpg) center no-repeat; background-size:auto

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.