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

The Archive Base Latest Questions

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

I am doing: android:background=@drawable/mobile_vforum_bg in the main.xml file to just set the BG. It

  • 0

I am doing:

android:background="@drawable/mobile_vforum_bg"

in the main.xml file to just set the BG.

It works, just the quality of the image is very poor when viewed on the emulator. Its a PNG at 320×480 (96dpi and the same in the low, med and high folder). When I was using Titanium to build my android app, it looked fine. I am now using eclipse and java and it looks bad.

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

    I had this issue while setting a high resolution image as an activity’s background and I was able to solve it by using the following java code from the Activity’s onCreate() method.

            BitmapFactory.Options myOptions = new BitmapFactory.Options();
            myOptions.inDither = true;
            myOptions.inScaled = false;
            myOptions.inPreferredConfig = Bitmap.Config.ARGB_8888;
            myOptions.inDither = false;
            myOptions.inPurgeable = true;
            Bitmap preparedBitmap = BitmapFactory.decodeResource(yourAppName.getSharedApplication().getResources(),
                    R.drawable.yourImage, myOptions);
            Drawable background = new BitmapDrawable(preparedBitmap);
            ((LinearLayout) findViewById(R.id.yourLayoutId))
                .setBackgroundDrawable(background);
    

    Also don’t set the background from the layout xml if you are using this code. In case this doesn’t work try setting the following lines outside the application tag in AndroidManifest.xml

    <supports-screens android:largeScreens="true"
        android:normalScreens="true" android:smallScreens="true"
        android:anyDensity="true" />
    

    Hope this Helps!!!

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

Sidebar

Related Questions

So I'm setting a button's background doing this: b.setBackgroundResource(R.drawable.custom_button1); How do I programmatically set
Possible Duplicate: Android - how to set the wallpaper image I hav started doing
I am using a shape XML drawable as a background of a LinearLayout. File:
I have set the background of my activity by doing: <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=fill_parent android:layout_height=fill_parent
I am trying to set the background color of an image view. <ImageView android:id=@+id/my_image
I am doing an android app, I want to drag an image and place
This is the basic XML file <?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=fill_parent android:layout_height=fill_parent android:orientation=vertical
I have this Listview element: <ListView android:id=@+id/category_list android:layout_width=fill_parent android:layout_height=fill_parent android:layout_weight=1 android:background=@drawable/list_background android:layout_marginTop=10sp android:layout_marginLeft=10sp android:layout_marginRight=10sp
I'm trying to start doing Android development on OS X (trying is the key
I'm trying to get a clear picture of what's involved practically when doing Android/ADK

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.