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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T23:30:23+00:00 2026-05-31T23:30:23+00:00

I am developing a game for android an i’m working on the menu screen

  • 0

I am developing a game for android an i’m working on the menu screen right now.
I am going to use my own drawables as a button, and I was just wondering if (and how) it is possible to pull individual drawables from different ares of a resource.

To say, I have the button overlay, a red button under-layer, and a grey under-layer, all on the same resource, and was wondering if I need to separate them into three distinct resources and use them, or can I pull from different areas of the resource?

  • 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-31T23:30:24+00:00Added an answer on May 31, 2026 at 11:30 pm

    It sounds like you want to use a technique that’s known as CSS Tiling. Android has no built-in support for the CSS feature where one can specify the bounds of an image resource and specify the X/Y direction of repetition.

    However, between Android and Java a programmer can do pretty much anything they want to an existing Bitmap or one they’ve created on-the-fly. In Android it’s possible to “clamp” images so only a certain region of the image is rendered. I found an example linked in an answer at Center a bitmap and repeat the edge pixel. The technique used in the linked article resembles what you’re trying to do.

    While it’s doable, it just isn’t as practical in Android as in CSS. For example, if you use a technique like above, and later need to change something in your resource image: you also have to manage the code that makes the resource work properly in your app. The alternative is having to manually “cut” the image (yes, as you suggest, into multiple resources) and this is probably better in the end. For example, if you need to make that resource a 9-PNG or perform other changes to it: your work is limited to Photoshop and doesn’t require any Java-writing, code-compilation, and probably requires less regression testing as a result.

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

Sidebar

Related Questions

Im developing a game for Android using AndEngine. As of now, I want to
I am developing an android game application,I have implemented all the screens.Now i want
I am developing an android game where balls are floating on the screen or
I am developing an android game with box2d and use a fixed timestep system
I'm developing chess game for Android ( androidchess.appspot.com ). If I want to add
I have been developing a game basic card game for Android. At the moment
I'm currently developing a small OpenGL game for the Android platform and I wonder
im developing a game in android, and i've been thinking about subdividing many of
I'm developing a game for android and this is my first experience with OpenGL.
i'm developing a android game which uses libgdx and bullet physics engine. I can

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.