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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T05:03:50+00:00 2026-05-19T05:03:50+00:00

Thanks at all for all your help for now.I have another little issues This

  • 0

Thanks at all for all your help for now.I have another little issues

This is a portion of my layout which give me some problems:

<RelativeLayout android:id="@+id/card_address_layout"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:visibility="visible"
            >
                 <TextView
                    style="@style/card_field"
                    android:id="@+id/card_indirizzo"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:layout_gravity="left|center_vertical"                     
                    android:layout_marginTop="8dp"                 
                    android:maxLength="35"
                    android:ellipsize="marquee"

                 /> 

                 <ImageButton 
                    android:id="@+id/card_address_button"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="right|center_vertical"
                    android:layout_toRightOf="@id/card_indirizzo"
                    android:src="@drawable/map_selector"
                    android:onClick="startMap"
                    android:padding="0dp"  />

         </RelativeLayout>

The image button src is a selector, in this case this one:

 <selector xmlns:android="http://schemas.android.com/apk/res/android">
 <item android:state_pressed="true" android:drawable="@drawable/map_b" /> <!-- pressed -->
 <item android:drawable="@drawable/map_a" />                 <!-- default -->

This is the result and I really don’t understand why, why the image button has padding??!!!

alt text

Help meeeee!

This is the FULL xml:

<?xml version="1.0" encoding="utf-8"?>

    <HorizontalScrollView android:id="@+id/card_images_horizontalscroll"
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:scrollbars="none"
        android:visibility="invisible"


        >


            <LinearLayout android:id="@+id/card_images_layout"
                            android:orientation="horizontal"
                            android:layout_width="wrap_content"
                            android:layout_height="80dp"
                            android:layout_marginRight="4dp"
            >




            </LinearLayout>




    </HorizontalScrollView>

    <TextView
        android:id="@+id/card_images_footer"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:singleLine="true"
        android:background="@drawable/click_it"
     />





<ScrollView android:id="@+id/card_data_verticalscroll"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="5dp"

            >

        <LinearLayout android:id="@+id/main_vertical_scroll_layout"
            android:orientation="vertical"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
        >


            <TextView
                style="@style/card_title"
                android:id="@+id/card_name"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:singleLine="true"
                android:layout_weight="1"
            />  
            <TextView
                style="@style/card_category"
                android:id="@+id/card_categoria"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:singleLine="true"
                android:layout_marginBottom="30dp"

             /> 

         <RelativeLayout android:id="@+id/card_address_layout"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:visibility="visible"
            >
                 <TextView
                    style="@style/card_field"
                    android:id="@+id/card_indirizzo"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:layout_gravity="left|center_vertical"                     
                    android:layout_marginTop="8dp"                 
                    android:maxLength="35"
                    android:ellipsize="marquee"

                 /> 

                 <ImageButton 
                    android:id="@+id/card_address_button"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="right|center_vertical"
                    android:layout_toRightOf="@id/card_indirizzo"
                    android:src="@drawable/map_selector"
                    android:onClick="startMap"
                    android:padding="0dp"  />

         </RelativeLayout>

         <RelativeLayout android:id="@+id/card_phone_layout"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:visibility="gone"
            >

                <TextView
                         style="@style/card_field"
                        android:id="@+id/card_telefono"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_alignParentLeft="true"
                        android:maxLength="35"
                        android:ellipsize="marquee"
                        android:layout_gravity="center_vertical"
                        android:layout_marginTop="8dp"
                     /> 

                <ImageButton android:text="call"
                        android:id="@+id/card_telefono_button"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_alignParentRight="true"
                        android:layout_gravity="right|center_vertical"
                        android:src="@drawable/call_selector"
                        android:onClick="startCall"

                    />
        </RelativeLayout>

        <RelativeLayout android:id="@+id/card_mail_layout"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:visibility="gone"
            >

                <TextView
                        style="@style/card_field"
                        android:id="@+id/card_mail"
                        android:layout_width="fill_parent"
                        android:layout_height="wrap_content"
                        android:layout_alignParentLeft="true"
                        android:maxLength="35"
                        android:ellipsize="marquee"
                        android:layout_gravity="center_vertical"
                        android:layout_marginTop="8dp"
                     /> 
                <ImageButton android:text="mail"
                        android:id="@+id/card_mail_button"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_alignParentRight="true"
                        android:layout_gravity="right|center_vertical"
                        android:onClick="startMailClient"
                        android:src="@drawable/mail_selector"

                    />
        </RelativeLayout>


         <RelativeLayout android:id="@+id/card_www_layout"
            android:orientation="horizontal"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:visibility="gone"
            >

                <TextView
                        style="@style/card_field"
                        android:id="@+id/card_www"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_alignParentLeft="true"
                        android:maxLength="35"
                        android:ellipsize="marquee"
                        android:layout_gravity="center_vertical"
                        android:layout_marginTop="8dp"
                     /> 
                <ImageButton android:text="www"
                        android:id="@+id/card_www_button"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_alignParentRight="true"
                        android:layout_gravity="right|center_vertical"
                        android:onClick="startDefaultBrowser"
                        android:src="@drawable/www_selector"
                    />
        </RelativeLayout>




        <TextView
            style="@style/card_description"
            android:id="@+id/card_descrizione"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:singleLine="false"
            android:layout_marginTop="30dp"
         /> 

         </LinearLayout>

</ScrollView>

  • 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-19T05:03:51+00:00Added an answer on May 19, 2026 at 5:03 am

    pedro , just change android:src="@drawable/map_selector" to android:background="@drawable/map_selector"

    & you are done!

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

Sidebar

Related Questions

Thanks for your help! I'd like to output all companyName entries that have uploads
First of all thank you for your time and sorry if some issues are
I have this Chrome Extension, it adds a poke all button under your pokes.
I am a newbie to VBS scripting. Thanks for all your comments! I fixed
first of all thanks for taking your time! I'm a junior Dev, working with
Firs of all thanks for reading this. I'm having trouble updating the progress from
First of all thanks in advance, this has been very frustrating and I'm hoping
First of all thanks for taking the time to look into this. I store
First off thanks to all the users who have made my android developing adventure
First, thanks for all the help I've received so far from StackOverflow. I've learned

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.