Androidを参照する: リスト項目を長押ししたときにグロー効果を実現するにはどうすればよいですか?
線形レイアウトの背景(ListViewでは使用されていません)に適用することlist_selector_holo_light.xml
で、長押しで光るアニメーション効果を実現できると思いました。
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_window_focused="false" android:drawable="@android:color/transparent" />
<!-- Even though these two point to the same resource, have two states so the drawable will invalidate itself when coming out of pressed state. -->
<item android:state_focused="true" android:state_enabled="false" android:state_pressed="true" android:drawable="@drawable/list_selector_disabled_holo_light" />
<item android:state_focused="true" android:state_enabled="false" android:drawable="@drawable/list_selector_disabled_holo_light" />
<item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/list_selector_background_transition_holo_light" />
<item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/list_selector_background_transition_holo_light" />
<item android:state_focused="true" android:drawable="@drawable/list_focused_holo" />
</selector>
ただし、水色から紺色に遷移する遷移アニメーション効果は見られません。
他に見逃したものはありますか?