Step1: Embbed the android:listSelector attribute in your ListView as Shown Below.
<ListView android:id="@+id/android:list"          android:layout_width="fill_parent"
        android:layout_height="wrap_content" 
        android:layout_below="@+id/Tablayoutdesign"
        android:cacheColorHint="#000000"
        android:dividerHeight="1dip"
        android:layout_marginTop="63dip"
        android:layout_marginBottom="40dip"
        /> 
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"> 
  <!-- Selected --> 
  <item 
    android:state_focused="true" 
    android:state_selected="false" 
    android:drawable="@drawable/focused"/> 
  <!-- Pressed -->
  <item 
    android:state_selected="true" 
    android:state_focused="false"
    android:drawable="@drawable/selected" /> 
</selector> 
<resources>
    <drawable name="focused">#ff5500</drawable>
    <drawable name="selected">#FF00FF</drawable>
</resources> 
ListView lv= (ListView) findViewById(R.id.list);
lv.setSelector( R.drawable.listselector);
 
 
 
 
 
My programmer is trying to persuade me to move to .net from PHP.
ReplyDeleteI have always disliked the idea because of the expenses.
But he's tryiong none the less. I've been using Movable-type
on several websites for about a year and am concerned about switching to another platform.
I have heard excellent things about blogengine.net. Is there a way I can transfer all my wordpress content into it?
Any help would be greatly appreciated!
Also visit my web page - pest control brisbane northside