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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:59:11+00:00 2026-06-10T05:59:11+00:00

project have 4 drawable and layout folder(xh,h,m,l). this is part of manifest: <uses-sdk android:minSdkVersion=8

  • 0

project have 4 drawable and layout folder(xh,h,m,l).
this is part of manifest:

<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="15" />
<supports-screens
    android:smallScreens="true"
    android:normalScreens="true"
    android:largeScreens="true"
    android:xlargeScreens="true"
    android:anyDensity="true" />

this is whole main xml code of xhdpi:

<?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"
android:background="@layout/bg_repeat" >

<RelativeLayout
    android:id="@+id/bg_header"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_gravity="top"
    android:background="@drawable/bg_header"
    android:padding="0dip">
    <ImageView
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:src="@drawable/text_header" />
</RelativeLayout>

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

and this is row xml for xhdpi:

<?xml version="1.0" encoding="UTF-8"?>
<LinearLayout
xmlns:android = "http://schemas.android.com/apk/res/android"
xmlns:foo="http://schemas.android.com/apk/res/test"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingRight="20dp"
android:paddingLeft="20dp">

<LinearLayout
    android:orientation="horizontal"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:background="@drawable/menu_selector">

<test.TextViewPlus
    android:id="@+id/menutext"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:textColor="#3D1E00"
    android:textSize="@dimen/TitleNormalXH"
    foo:customFont="Mj_Shablon.ttf"
   android:gravity="right|center_vertical"/>
</LinearLayout>
</LinearLayout>

and this is galaxy note emulator setting:
dpi:285 . android version:google api level 10 (2.3.3)

and this is output:

enter image description here

second question: different between put android:background=”@drawable/menu_selector” for row’s layout ,and listview’s layout ?

  • 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-10T05:59:13+00:00Added an answer on June 10, 2026 at 5:59 am

    main xml code:

    <?xml version="1.0" encoding="utf-8"?>
    <merge xmlns:android="http://schemas.android.com/apk/res/android">
    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:orientation="vertical">
        <RelativeLayout
            android:id="@+id/bg_header"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:background="@drawable/bg_header">
            <ImageView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/text_header" />
        </RelativeLayout>
        <ListView
            android:id = "@+id/mainlist"
            style="@style/ListView"
            android:dividerHeight="2.5dp"
            android:layout_marginTop="10dp"
            android:layout_marginBottom="10dp"/>
    </LinearLayout>
    </merge>
    

    Row xml code:

    <?xml version="1.0" encoding="UTF-8"?>
    <RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:dr="http://schemas.android.com/apk/res/pak"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:paddingRight="20dp"
    android:paddingLeft="20dp">
    <RelativeLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/menu_selector"
        android:gravity="center">
    
        <pak.TextViewPlus
            android:id="@+id/menutext"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="right"
            android:textSize="@dimen/TitleNormalM"
            android:gravity="right"
            dr:customFont="Mj_Shablon.ttf"
            android:padding="0dp"/>
    
    </RelativeLayout>
    </RelativeLayout>
    

    and nine patch image must be like about : https://i.stack.imgur.com/PE9ly.png

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

Sidebar

Related Questions

I have a custom drawable in my android project that should be the background
i have created a java project in eclipse,in this project i have an html
I have set up my project with different drawable directories (ldpi, mdpi and hdpi).
I have developed some reusable android component which is basically a class . This
I have the following layout in XML (splashscreen.xml): <?xml version=1.0 encoding=utf-8?> <FrameLayout xmlns:android=http://schemas.android.com/apk/res/android android:id=@+id/frmLayout
In my android project, i have saved camera snapshots along with some description in
I am writing an Android app. I have an activity in my main project
I have a library project in which I define an action bar in layout
I have created my first project (after several tutorials and reading the Android Developers
i have a error on my android project that i cant solve. I have

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.