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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T08:11:00+00:00 2026-06-06T08:11:00+00:00

I have following Image as src in ImageView. I use this as background image.

  • 0

I have following Image as src in ImageView. I use this as background image.
This makes my application memory to grow from ~5MB to ~20M.

enter image description here

This is the code that uses this image: (android:id=”@+id/listViewBackground” is the imageview i’m talking about)

    <RelativeLayout
    android:id="@+id/ContentLayout"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_below="@id/ButtonsMenu"
    android:background="@android:color/transparent" >

    <ImageView
        android:id="@+id/listViewBackground"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="@android:color/transparent"
        android:scaleType="center"            
        android:src="@drawable/background" />

    <LinearLayout
        android:id="@+id/header"
        android:layout_width="fill_parent"
        android:layout_height="50dp"
        android:background="@android:color/transparent" >

        <TextView
            android:id="@+id/leftHeader"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:background="@drawable/button_green"
            android:gravity="center"
            android:text="@string/Title_BatteryLevel"
            android:textColor="@android:color/white" />

        <TextView
            android:id="@+id/rightHeader"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:background="@drawable/button_blue"
            android:gravity="center"
            android:text="@string/Title_Duration"
            android:textColor="@android:color/white" />
    </LinearLayout>

    <LinearLayout
        android:id="@+id/AdLayout"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:background="@android:color/transparent" >
    </LinearLayout>

    <ListView
        android:id="@+id/listView"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_above="@id/AdLayout"
        android:layout_below="@id/header"
        android:background="@android:color/transparent"
        android:cacheColorHint="#00000000"
        android:clickable="false"
        android:focusable="false"
        android:focusableInTouchMode="false"
        android:listSelector="@android:color/transparent"
        android:paddingBottom="5dp" >
    </ListView>
</RelativeLayout>

I need this image to much different screen sizes so its in hight resolution.
I want also that the lines will be seen.

How can I reduce the memory taken by my app?

  • 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-06T08:11:03+00:00Added an answer on June 6, 2026 at 8:11 am

    First, cut your image down to just the repeatable section.

    Second, follow this tutorial on how to apply a background image to a View (in this case your Relative layout “listViewBackground” ) http://androidforbeginners.blogspot.com/2010/06/how-to-tile-background-image-in-android.html

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

Sidebar

Related Questions

i have the following script css: img { background-image:url(man.png); background-repeat:no-repeat; padding-top:6px; padding-bottom:60px; padding-left:10px; padding-right:10px;
I have the following code which renders an image as the background for a
I have the following CSS where an image 'vote_up' is a background image. I'd
I have following code on my site: backgroundImages[bg_img_path_b]=new Image(); backgroundImages[bg_img_path_b].src = bg_img_path_b; backgroundImages[bg_img_path_b].loaded=loading; //jQuery(backgroundImages[lastImage]).unbind('load.backgroundImages');
I have the following image element that it's src does not exists. I want
as i have to create a function which can change the image (src/ background-url).
I have following code <div class=img> <img src=image/1.jpg class=img_s style=display:none; /> <img src=image/2.jpg class=img_s
I have the following simple preloading function which substitute an image src attribute with
I have the following line of javascritp $(#hero_image img).attr('src', src); to change an image.
I have the following in a js.erb file: //add an image from the gallery

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.