You need to do two things:
- Use
mListView.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
- Make your custom row view implement
Checkable
. (More info about this here).
More Related Contents:
- Android: Radio button in custom list view
- Android Studio – Firebase Fatal error
- Android How to adjust layout in Full Screen Mode when softkeyboard is visible
- How do I create a ListView with rounded corners in Android?
- Android Paint: .measureText() vs .getTextBounds()
- getView returning null when fragment has been created from an activity
- Android Custom Shape Button
- Cursor adapter and sqlite example [closed]
- What are the differences between LinearLayout, RelativeLayout, and AbsoluteLayout?
- How to limit the height of Spinner drop down view in Android
- ANDROID – ExpandableListView
- How can I dynamically create menu items?
- How to save the image to SD card on button Click android [closed]
- Change background of ProgressDialog
- Android: how to draw a border to a LinearLayout
- Custom Layout that rounds the corners of its content
- Add new item count to icon on button – Android
- RelativeLayout is taking fullscreen for wrap_content
- Android Jetpack Compose width / height / size modifier vs requiredWidth / requiredHeight / requiredSize
- How to detect bottom soft navigation bar available in android programmatically?
- Why does calling getWidth() on a View in onResume() return 0?
- Adding LinearLayout programmatically in Android doesn’t work
- How to add views dynamically to a RelativeLayout already declared in the xml layout?
- How to turn off CalendarView in a DatePicker?
- Something’s wrong in Corner radius Android
- Android SlidingTabLayout with icons
- Android Studio (Dolphin | 2021.3.1) & (Electric Eel | 2022.1.1) does not show layout preview
- Hex colors in Android are sometimes eight digits. How? What is the difference between #FFFFFF and #FFFFFF00?
- What event is fired after all views are fully drawn?
- ERROR No package identifier when getting value for resource number