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

  • Home
  • SEARCH
  • 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 8525793
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T08:05:09+00:00 2026-06-11T08:05:09+00:00

I use selector for ListFragment My xml for ListFragment <LinearLayout xmlns:tools=http://schemas.android.com/tools xmlns:android=http://schemas.android.com/apk/res/android android:id=@+id/LinearLayout1 android:layout_width=match_parent

  • 0

I use selector for ListFragment

My xml for ListFragment

<LinearLayout xmlns:tools="http://schemas.android.com/tools"
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/LinearLayout1"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#F1F4F2"
    android:orientation="horizontal" >

    <fragment
        android:name="usanin.max.gps_logger.Fragment_Left"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_weight="5" />

       <FrameLayout
           android:id="@+id/frag_content"
           android:layout_width="match_parent"
           android:layout_height="fill_parent"
           android:layout_weight="2" />

</LinearLayout>

xml for items ListFragment

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="@drawable/arrow"
    android:orientation="horizontal" >

    <LinearLayout
        android:id="@+id/linearLayout1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center_vertical|left"
        android:layout_marginBottom="5dp"
        android:layout_marginLeft="5dp"
        android:layout_marginTop="5dp"
        android:layout_weight="1"
        android:gravity="center_vertical"
        android:orientation="vertical" >

        <TextView
            android:id="@+id/tvDescr"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical" >
        </TextView>
    </LinearLayout>

    <ImageView
        android:id="@+id/ivImage"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center_vertical"
        android:maxHeight="20dp"
        android:minHeight="20dp" >
    </ImageView>

</LinearLayout>

to press the button I use the selector arrow.xml

<item android:state_focused="true" android:state_pressed="true"><shape>
        <gradient android:angle="90.0" android:endColor="#BA55D3" android:startColor="#800080" android:type="linear" />

        <corners android:radius="5.0dp" />
    </shape></item>
<item android:state_focused="false" android:state_pressed="true"><shape>
        <gradient android:angle="90.0" android:color="#F1F4F2" android:endColor="#53AC71" android:startColor="#53AC71" android:type="linear" />

        <corners android:radius="5.0dp" />
    </shape></item>
<item android:state_activated="true"><shape>
        <gradient android:angle="90.0" android:endColor="#3DF5E9" android:startColor="#3DF5E9" android:type="linear" />

        <corners android:radius="5.0dp" />
    </shape></item>
<item><shape>
        <gradient android:angle="90.0" android:endColor="#8E9C8B" android:startColor="#8E9C8B" android:type="linear" />

        <corners android:radius="5.0dp" />
    </shape></item>

but I have a problem, when I pressed on the button – color background changed

I tried to set the selector when pressed “android:background” but does not work

enter image description here

  • 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-11T08:05:12+00:00Added an answer on June 11, 2026 at 8:05 am

    You should set android:listSelector="@null" on your list. Your problem are the transparent corners where the default selector is visible.

    I assume you use a ListFragment, right? So at some point (xml or code) you need to have your ListView somewhere.

    If you are generating the listview programmatically try to use this in your onViewCreated() of the ListFragment:

    getListView().setSeletor(android.R.color.transparent);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have styles <resources xmlns:android=http://schemas.android.com/apk/res/android> <style name=TextStyle > <item name=android:textSize>8sp</item> <item name=android:textColor>#0A0A0A</item> <item name=android:typeface>serif</item>
I want to use following selector drawable for android gallery image will it work
I use this jQuery slide show http://css-tricks.com/moving-boxes/ in my page but the problem in
If I use the following selector I get no results $(.itemSearchModule .cmsItemList[rel='myRelValue']) for the
I want to use a JQuery selector to grab an elelement if it is
I am trying to use a jQuery selector on data I get back from
I would like to use a css selector to get only the th tags
I struggle to use a jquery selector containing brakcets. Basically I parse a JSON
I am trying to use JMS Message Selector with ActiveMQ. I read the documentation
How can I make this link use the child selector without changing or removing

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.