Skip to content
Demo showing how to highlight list items on press, while being in CAB (Action Mode) in Android, even in versions lower than Android API 11.
Java
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
ActionBarSherlock
CABHighlightListItemOnPressDemo
screenshots
.gitignore
LICENSE.md
README.md

README.md

Android Contextual Action Bar (CAB) Demo - Highlighting list items on press

CAB-HighlightListItemOnPressDemo is a demo project that shows how to:

  • Use a Contextual Action Bar (CAB)
  • Launch CAB on list item long click
  • Multiple selection of list items while on CAB
  • Select item both on click and on long click
  • Items highlighting on press, not on click (like done, for example, in the Tasks app)
  • Correct handling of different selector states

CAB-HighlightListItemOnPressDemo should work in every version of Android from 2.x and up.

Usage

In order to test the CAB, perform a long click over any of the items. You can select/unselect items both using touches or the D-pad/trackpad.

Acknowledgements

This demo project uses the Open Source library ActionBarSherlock, from Jake Wharton.

Developed By

License

Copyright 2013 Edu Zamora

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Screenshots

Normal list

CAB Mode

Something went wrong with that request. Please try again.