Questions tagged [checkedtextview]

CheckedTextView is a subclass of the Android's TextView class which implements the Checkable interface.

156 questions
52
votes
7 answers

android: CheckedTextView cannot be checked?

Initially I wanted a checkmark where the text is placed on the left of the checkmark. After searching on this site I found out the best workaround is android:CheckedTextView? However, I found out that the checkmark cannot be changed manually by…
Yang
  • 6,682
  • 20
  • 64
  • 96
17
votes
2 answers

Setting ListView item checked from Adapter

I have a ListView which displays 2 kinds of items. One of these kinds contains CheckedTextView. As an adapter I'm using custom adapter extending ArrayAdapter with data structure containing information about checked/unchecked states inside. Some of…
Izydorr
  • 1,926
  • 3
  • 23
  • 40
14
votes
5 answers

Android how to use checkedtextview

the title speaks for itself. I am over several articles, topics and still haven't figured out how to use checkedtextview. I want a listview with checkable items. In the following code i am using a listview and populating it with a string array. But…
erdomester
  • 11,789
  • 32
  • 132
  • 234
13
votes
1 answer

center text and checkmark of CheckedTextView

Layout i implemented like below picture : And code I used is :
Reprator
  • 2,859
  • 2
  • 32
  • 55
12
votes
1 answer

listview setItemChecked doesn't work

For some reason setItemChecked doesn't work. can some one help me fix ti ? String[] str = getResources().getStringArray(R.array.brush_type); sizeArrayAdapter = new ArrayAdapter(this.getContext(), R.layout.drawing_list_item, str); listType =…
Mark T
  • 773
  • 4
  • 10
  • 22
12
votes
2 answers

android.content.res.Resources$NotFoundException when programmatically setting android.R.attr.listChoiceIndicatorMultiple

I'm trying to programmatically set the "android:checkMark" attribute on CheckedTextView items I have in a ListView. When running my application I get the following exception: android.content.res.Resources$NotFoundException: Resource ID…
dbm
  • 10,376
  • 6
  • 44
  • 56
12
votes
1 answer

Overriding referenced style attributes

After reading through References To Theme Attributes I am trying to reference the value of an attribute in the my custom theme that I have set. I am applying a user-defined style to a CheckedTextView
Etienne Lawlor
  • 6,817
  • 18
  • 77
  • 89
11
votes
3 answers

Android CheckedTextView Checkbox on Left

Just a quick simple question, I am using CheckedTextView and I was wondering what, if any, line of code I could use to place the check box on the left side instead of the right side. Here is my current CheckedTextview Code:
Mowza2k2
  • 123
  • 1
  • 11
10
votes
1 answer

Android: How can I check a particular item in a Checked ListView?

I am using a ListView in which only one item can be checked at a time. This is my custom list_row.xml:
kiki
  • 13,627
  • 17
  • 49
  • 62
9
votes
1 answer

Refreshing Fragment View while using FragmentStatePagerAdapter

Seems the refresh issue is discussed before, but none of the solutions worked for me. What I am trying to do: I am using FragmentStatePagerAdapter. Each position of the adapter holds a fragment that has a linear layout that has chess like…
8
votes
1 answer

Android Click on listItem checks wrong checkbox

I've created a custom ListView by extending SimpleCursorAdapter. The result is IMAGE + CheckedTextView (Text + Checkbox). When I long click an Item, everything works fine - I get the right ID and details of the clicked Item. The problem occurs when…
Lior Iluz
  • 26,213
  • 16
  • 65
  • 114
8
votes
3 answers

Android checkMarkGravity attribute of CheckedTextView (api 21 )

The select_dialog_singlechoice_material.xml layout from the plattform source uses the android:checkMarkGravity="start"attribute: