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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:07:08+00:00 2026-05-22T17:07:08+00:00

I have a custom ListView selector: <?xml version=1.0 encoding=utf-8?> <selector xmlns:android=http://schemas.android.com/apk/res/android> <item android:state_enabled=false android:state_focused=true

  • 0

I have a custom ListView selector:

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

<selector xmlns:android="http://schemas.android.com/apk/res/android">
  <item android:state_enabled="false" android:state_focused="true"
        android:drawable="@drawable/stocks_gradient" />
  <item android:state_pressed="true"
        android:drawable="@drawable/titlebar_gradient" />
  <item android:state_focused="true"
        android:drawable="@drawable/titlebar_gradient" />
</selector>

Here is my gradient:

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <gradient 
        android:startColor="#FF600D0B"
        android:endColor="#FF89130A"
        android:angle="90"
        android:dither="true"
     />
</shape>

Here is my Layout:

<?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/streamRelativeLayout">
        <ListView android:layout_height="fill_parent" android:layout_width="fill_parent" android:id="@+id/streamListView" android:cacheColorHint="#00000000" android:fadingEdge="none" android:drawSelectorOnTop="true" android:listSelector="@drawable/swipe_view_selector"></ListView>
        <TextView android:layout_centerInParent="true" android:layout_height="wrap_content" android:id="@+id/noStreamTextView" android:layout_width="wrap_content" android:text="No Stream Available" android:visibility="invisible"></TextView>
        <ProgressBar android:layout_centerInParent="true" android:layout_height="wrap_content" android:id="@+id/streamProgressBar" android:layout_width="wrap_content"></ProgressBar>
    </RelativeLayout>

The selector appears when the color is opaque, but when I add transparency to the gradient, it doesn’t appear. How can I make my gradient transparent so that it appears on the listview?

  • 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-22T17:07:09+00:00Added an answer on May 22, 2026 at 5:07 pm

    I’m not following really what you need, bu the answer to the last sentence, is to change

        android:startColor="#FF600D0B"
        android:endColor="#FF89130A"
    

    To some transparent (maybe not fully transparent?) color. Change the first two hex digits (FF) to anything lower. That is the alpha of the color, so android:startColor="#00600D0B" will make it completely transparent, while android:startColor="#88600D0B" will make create a 50% opacity.

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

Sidebar

Related Questions

I have created a custom listView with the row as follows: <RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=fill_parent
I have custom list_row : <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:orientation=horizontal android:layout_width=match_parent android:orientation=horizontal android:layout_width=match_parent android:layout_height=wrap_content android:baselineAligned=false> <Button
I have done my custom ListView, the xml was following: <?xml version=1.0 encoding=utf-8?> <LinearLayout
I have a custom ListView, the code is below. Instead of writing: http://yoursite.com/image1.png ,
I have a listView with custom objects defined by the xml-layout below. I want
I have a custom listView. The main layout xml is something like this: <?xml
I have one custom ListView called AreasListView which I've included in the XML file.
In android application i have a custom listview and sqlite database. I want to
I have a Custom ListView created from XML Layout. I want to bind that
I have a custom listview row whose XML has one ImageView and three TextViews

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.