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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T13:19:34+00:00 2026-05-31T13:19:34+00:00

I have created my first project (after several tutorials and reading the Android Developers

  • 0

I have created my first project (after several tutorials and reading the Android Developers Dev Guide) and have a simple tiled background. Just to put my reading about supporting multiple screens to the test (http://developer.android.com/guide/practices/screens_support.html) I created a background tile for every dpi so I have one tile at 120 dpi, one at 160, one at 240, and one at 320. I put a letter in each tile respectively so the 240 has an H, 320 X etc. When I run the app in an AVD that supports the different densities the proper image is used. This is in perfect alignment with my reading.

What I am confused on is that I only have to have one drawable xml file and it can be about anywhere to work. Now the xml is all the same since I used the same image name just changed the dpi. So how does the system find my drawable file that is referenced from my layout xml? Does it search every drawable folder till it finds a match? If there are “common” purpose files such as this shouldn’t I maybe have a “common” drawable folder?

background.xml (aka my drawable)

<?xml version="1.0" encoding="utf-8"?><bitmap xmlns:android="http://schemas.android.com/apk/res/android" android:src="@drawable/ironmikebackgrnd" android:tileMode="repeat" android:dither="true" />

main.xml

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" android:background="@drawable/background">

and my project folder structure (feel free to critique)….aaarrrgggg Guess I’m not allowed to post images yet. Go here to see the folder structure.
Eclipse Folder Structure

On further exploration I see that it get’s auto generated into the gen > R.Java directory. So that is how it is found but as for the project structure what would you reccomend for storing “global” / “common” type files.

  • 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-05-31T13:19:35+00:00Added an answer on May 31, 2026 at 1:19 pm

    You can put your background.xml in “drawable” folder. (With no qualifiers)

    So it shall match and can be used regardless of the current screen resolution.

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

Sidebar

Related Questions

I am trying to write my first WCF project. I have created a project
I have a big project that was first created in Borland C++ 6. We're
I have created a file argument.pl which takes several arguments first of which should
I have created my first project in C# which uses sql server database (file
I have created a tabbar based project and my first tab have a navigation
New to NetBeans dev here. When I first created my project and began compiling,
I have successfully created my first django project. I have two apps in my
Let me first describe my goal: I have created an object with 3 properties:
I have a folder with these files: alongfilename1.txt <--- created first alongfilename3.txt <--- created
I'm new to NHibernate and trying to create my first mapping. I have created

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.