android - ImageView is not highlighting on click -
i designing app multiple devices.in using imageview , using selector setting background image depends on state.i works fine devices except 1 10 inch device.
<framelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" android:clickable="true" > <linearlayout android:layout_width="145dp" android:layout_height="239dp" android:layout_marginright="6dp" android:background="@drawable/common_selector_thumbnail_shadow_title_background" android:gravity="center" android:orientation="vertical" android:paddingleft="5dp" android:paddingright="5dp" > <framelayout android:layout_width="130dp" android:layout_height="186dp" android:layout_margintop="5dp" android:background="@color/rgb_100_215_216_217" > <imageview android:id="@+id/seasonal_favorites_default_image" android:layout_width="match_parent" android:layout_height="match_parent" android:scaletype="center" android:src="@drawable/tw_noitem_movie" /> </framelayout> <textview android:id="@+id/seasonal_favorites_list_text" android:layout_width="140dp" android:layout_height="43dp" android:duplicateparentstate="true" android:ellipsize="end" android:gravity="center_vertical" android:paddingleft="10dp" android:paddingright="10dp" android:singleline="true" android:textcolor="@drawable/common_selector_thumbnail_shadow_title_textcolor" android:textsize="18dp" /> </linearlayout> </framelayout> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@drawable/thumbnail_title_bg_focus" android:state_focused="true" android:state_pressed="true"/> <item android:drawable="@drawable/thumbnail_title_bg_focus" android:state_pressed="true"/> <item android:drawable="@drawable/thumbnail_title_bg_focus" android:state_focused="true"/> <item android:drawable="@drawable/thumbnail_title_bg"/> </selector>
thanks in advance.
probabilly have put in manifest file: hardwareaccelerated="true"
try , let me know if worked!
Comments
Post a Comment