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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T14:16:11+00:00 2026-06-13T14:16:11+00:00

I have a nine patch image for background. It’s 802px x 286px (2px in

  • 0

I have a nine patch image for background. It’s 802px x 286px (2px in both w&h added automatically By 9patchtools).

The main.xml looks like:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/crown"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/crown">
<ListView
    android:id = "@+id/mainmenulist"
    style="@style/MainMenuList"
    android:dividerHeight="2.5dp"/>
</RelativeLayout>

The styles.xml looks like:

<resources
xmlns:android="http://schemas.android.com/apk/res/android">
<style name="MainMenuList">
    <item name="android:layout_width">fill_parent</item>
    <item name="android:layout_height">fill_parent</item>
    <item name="android:cacheColorHint">@android:color/transparent</item>
    <item name="android:listSelector">@android:color/transparent</item>
    <item name="android:divider">@null</item>
    <item name="android:gravity">right</item>
</style>
<style name="MainMenuRow">
    <item name="android:layout_width">fill_parent</item>
    <item name="android:layout_height">wrap_content</item>
    <item name="android:textColor">#000000</item>
    <item name="android:gravity">right|center</item>
    <item name="android:padding">0dp</item>
</style>
</resources>

The themes.xml in values folder:

<resources
xmlns:android="http://schemas.android.com/apk/res/android">
<style name="AppTheme" parent="android:Theme.Light.NoTitleBar.Fullscreen">
    <item name="android:windowNoTitle">true</item>
    <item name="android:windowBackground">@color/mycustomblue</item>
</style>
</resources>

mpart of manifest.xml:

<application android:label="@string/app_name"
    android:icon="@drawable/ic_launcher"
    android:theme="@style/AppTheme">

It’s row image:

it’s background(crown) image:

The output should be like this:

But it looks like this:

My questions are:

  1. My ninepatched image for background is 802×286. My device is galaxy S3 with android 4.0.4 and 720×1280(WxH). Does image can scale down to fit width? (in other words if I use a 9patch image 100×100 for a device that is 200×200 , we knows its good and scale up. But the question is here that if use for device that is 50×50, what’s happen?)

  2. Why is my application not fullscreen?

  3. Why is the sample text not middle and right aligned?

  4. Why is the row image scale up undue?

  • 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-13T14:16:13+00:00Added an answer on June 13, 2026 at 2:16 pm
    1. I think the nine ninepatched image would not be shrunk or stretched when you don’t tell the part to scale in horizontal.The image only be scaled from just those 2pxes, so the smallest width is 798px, you may need a smaller image.

    2. android:windowNoTitle control the titlebar whether to display, not the status bar. Title bar is part of you activity, but status bar is part of system. what you need maybe android:windowFullscreen

      <!-- Variant of {@link #Theme} with no title bar -->
      <style name="Theme.NoTitleBar">
          <item name="android:windowNoTitle">true</item>
      </style>
      
      <!-- Variant of {@link #Theme} that has no title bar and no status bar -->
      <style name="Theme.NoTitleBar.Fullscreen">
          <item name="android:windowFullscreen">true</item>
          <item name="android:windowContentOverlay">@null</item>
      </style>
      
    3. Right and center are conflicting, you may use right|center_vertical. Do you use a single TextView as list item ,can you provide you list item layout

    4. This may be caused by android:listPreferredItemHeight property in theme. Use an explicit layout_height may fix this problem.

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

Sidebar

Related Questions

I'm creating a nine-patch image for a widget background and I'd like to have
I am trying to use a nine patch image as a background in an
I have a textview and a nine-patch image. Assigning this image in the xml
have a problem. At first look at this HTML <div id=map style=background-image: url(map.png); width:
I have a black & white ninepatch drawable as background of a view and
I am trying to create a nine patch drawable . I created an image
I am trying to create a custom-styled seekbar. I have two nine-patch images one
I have three 9-patch PNG's which together make up the background for a button
I'd like to use a 1x1 size Nine-patch image from Android drawable resources. When
I want to create a nine patch button background with a gradient for my

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.