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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T12:38:53+00:00 2026-06-09T12:38:53+00:00

I wanna use one image ( 1280×800 ) for two device with different screen

  • 0

I wanna use one image ( 1280×800 ) for two device with different screen size and same density .

Screen sizes are 1280x800 and 320x480 .

image is nine patch ( with content area ) . I want to use image for a row’s background , that have a textview . and don’t use manual padding for text ( i wanna use content area ) .

if i use this xml :

<RelativeLayout
xmlns:android = "http://schemas.android.com/apk/res/android"
xmlns:foo="http://schemas.android.com/apk/res/pak.name"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@layout/menu_selector"
android:gravity="right|center_vertical">

<pack.name.TextViewPlus
    android:id="@+id/menutext"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:textColor="#3D1E00"
    android:textSize="@dimen/TitleNormalM"
    foo:customFont="font.ttf"
    android:text="blah blah"/>

output in emulator is:

http://ivm.neru9.com/pic/2ccf95a7f2e1.png

and if i use this xml:

<RelativeLayout
xmlns:android = "http://schemas.android.com/apk/res/android"
xmlns:foo="http://schemas.android.com/apk/res/pack.name."
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:paddingRight="15dp"
android:paddingLeft="15dp">

<ImageView 
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:src="@layout/menu_selector"
    android:scaleType="fitCenter"
    />

<pack.name..TextViewPlus
    android:id="@+id/menutext"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:textColor="#3D1E00"
    android:textSize="@dimen/TitleNormalM"
    foo:customFont="font.ttf"
    android:gravity="right|center_vertical"
    android:text="blah blah blah"/>

output is:

http://ivm.neru9.com/pic/f20f7f5d2e7a.png

and this is listview xml (that i think not important for this question) :

<ListView
    android:id = "@android:id/list"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:divider="@null"
    android:dividerHeight="3dp"
    android:layout_marginTop="5dp"
    android:layout_marginBottom="5dp"
    android:cacheColorHint="@android:color/transparent"
    android:listSelector="@android:color/transparent"
    />

and its menu_selector xml code that is in layout folder:

<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- pressed -->
<item android:state_pressed="true" android:drawable="@drawable/bg_menu_pressed" />
<!-- selected -->
<item android:state_selected="true" android:drawable="@drawable/bg_menu_focused" />
<!-- selected & pressed -->
<item android:state_selected="true" android:state_pressed="true" android:drawable="@drawable/bg_menu_pressed" />
<!-- default -->
<item android:drawable="@drawable/bg_menu" /> 

  • 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-09T12:38:54+00:00Added an answer on June 9, 2026 at 12:38 pm

    please check out this project,

    basically problem is your 9 patch image, i just modify your image for desire performance for your problem.

    i will suggest you to use bg_menu277x77 for 1280×800 and bg_menu144x40 for 320×480 resolution from above linked project. Just for testing you can interchange both image for both resolution and try.

    Bellow i try my best to explain 9 patch image, other great tutorial & information you can google it 🙂

    enter image description here

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

Sidebar

Related Questions

I wanna upload/update file by System.IO.FileStream in Google Documents List API(C#)? I use two
Wanna to split a screen for my app with two LinearLayouts. What parameters should
I wanna know if it is possible to use multiple spiders within the same
I wanna use harvested gem in one of my models. It's installed (no issues),
I'm starting a new project and i wanna use normalize.css but i'm facing one
the following scenario: We wanna use one root-folder for our eclipse projects. Since i
I wanna use powershell to get all the file in sharepoint library EM_DOC_LIBRARY and
In my Asp.Net project I wanna use Property Auto-wiring, e.g. for my ILogger. Basically
i had use the spring3.1 ibatis2.x and mysql5.5. then i wanna use the replication
I have a Class CButtonCreate without get & set Methode. But i wanna use

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.