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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T00:32:15+00:00 2026-06-06T00:32:15+00:00

How to do this kind of events when I pressed the Preferences Button I

  • 0

How to do this kind of events

when I pressed the Preferences Button I need to change only the background color of the arrow.

enter image description here

what I did is when I put
android:background="@null" for TextView is not working showing the whole view with blue color background.

<LinearLayout
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_centerVertical="true"
                android:background="@drawable/btn_selector"
                android:clickable="true" >

                <ImageView
                    android:id="@+id/back_arrow"
                    android:layout_width="wrap_content"
                    android:layout_height="match_parent"
                    android:src="@drawable/ic_ab_back_holo_dark" />

                <TextView
                    android:id="@+id/settings_title"
                    android:layout_width="wrap_content"
                    android:layout_height="match_parent"
                    android:layout_marginLeft="10dp"
                    android:background="@null" 
                    android:layout_toRightOf="@id/back_arrow"
                    android:gravity="center_vertical"
                    android:text="@string/settings_title"
                    android:textColor="@color/white"
                    android:textSize="22sp" />
            </LinearLayout>
  • 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-06T00:32:19+00:00Added an answer on June 6, 2026 at 12:32 am

    Just set the textview normally, black background (#000000) and have an imageButton set the src as a drawable selector:

        <ImageButton android:id="@+id/imageButton" android:layout_width="fill_parent"
             android:layout_height="wrap_content" android:background="@null" android:gravity="center_horizontal" 
             android:paddingLeft="50dp" android:paddingTop="25dp" android:src="@drawable/button_selector"/>
    

    selector:

    <?xml version="1.0" encoding="utf-8"?>
    <selector xmlns:android="http://schemas.android.com/apk/res/android">
        <item android:state_pressed="true"
            android:drawable="@drawable/button_pressed"/>
        <item android:state_pressed="false"
                android:drawable="@drawable/button_rested"/>
        <item android:state_enabled="false"
                android:drawable="@drawable/button_disabled"/>
    </selector>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing an lib which tracks user events, like button click, state change,
I've had this kind of issue before, with updating GUI elements via events raised
This kind of code would normally work in PHP, but since the scope is
this kind of emergency, so please, can someone help me... I'm using movingboxes plugin
This was the first time I encountered this kind of error after dealing with
My pages contain this kind of url: http://fashion.piliapp.com/author/http%3A%2F%2Fwww.wretch.cc%2Fblog%2Fwiwinnie/ which created by http://fashion.piliapp.com/author/ . rawurlencode(http://www.wretch.cc/blog/wiwinnie)
I perform this kind of query in my Python code to conn = rdbms.connect(instance=_INSTANCE_NAME,
I have this kind of question. In my form, i got this as a
I'm getting this kind of errors while compiling any of the Win 8 Metro
I know this kind of questions have been asked already many times before. The

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.