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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:31:21+00:00 2026-05-29T05:31:21+00:00

I have a problem with changing button background image. So i have 2 images

  • 0

I have a problem with changing button background image.
So i have 2 images (png-24 transparent background).
Images are a simple circle and the same circle but with some outerglow ).
I have the following code

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/ticketing_row_topup"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:background="@layout/pressed_topup_button"
    android:orientation="horizontal" >

<TextView
    android:id="@+id/topup_name"
    android:layout_width="60dp"
    android:layout_height="fill_parent"
    android:gravity="center_vertical|right"
    android:paddingRight="5dip"
    android:paddingTop="22dip"
    android:text="€"
    android:textColor="@color/black"
    android:textSize="35sp"
    android:textStyle="bold" />

<TextView
    android:id="@+id/topup_display_amount"
    android:layout_width="90dp"
    android:layout_height="match_parent"
    android:gravity="center_vertical|left"
    android:textSize="65sp"
    android:textColor="#0d457f"
    android:textStyle="bold" />
</LinearLayout>

And the pressed_topup_button.xml

 <?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" android:state_enabled="false">
    <item android:state_pressed="true" android:state_enabled="true" android:drawable="@drawable/button_topup_glow" /> 
    <item android:state_focused="true" android:state_enabled="true" android:drawable="@drawable/button_topup" />
    <item android:state_enabled="true" android:drawable="@drawable/button_topup" /> 
</selector>

The LinearLayout is used to populate a GridView in each cell.
When i click the cell the behavior is correct (the glow is displayed) but also a yellow color is display on the corner of the image (where suppose to be transparent). How can i fix that?
Thanks

  • 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-29T05:31:22+00:00Added an answer on May 29, 2026 at 5:31 am

    You need to add

     android:listSelector="@android:color/transparent"
    

    to your GridView declaration.

    See this:
    Android: Disable highlighting in GridView

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

Sidebar

Related Questions

I have an image button with a background image .png of a circle. I
I have a problem changing the focus to some button on xaml. The code
I have a problem in creating a Button with text and image on it.
I'm trying to create a vertical button in PHP, but I have problem with
HI! I have a problem with changing the name of a select element. I
I have problem in some JavaScript that I am writing where the Switch statement
I have problem when I try insert some data to Informix TEXT column via
I want to be able to set the background of an image button in
I have a minor problem, basically I have a hidden input button which is
I have the problem: I can not add new item to the same combobox

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.