2017-03-16 6 views
0

ビューモデルを使用してチェックボックスの属性を設定する場合、app:checkedがプログラムで設定されている場合、画像のような輪郭のみがチェックされません。他のすべては期待どおりに動作します。誰もこれを前に見たか、助けることができますか?Androidチェックボックスapp:checked = true、doesnt show checkmark

Notice the first checkbox is not checked, and app:checked = true is set programmatically using a viewModel.

+1

同様にあなたのコードを追加します。 –

答えて

1
<CheckBox 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:text="Your text" 
     android:checked="true" 
     /> 

または

checkbox.setChecked(true); 
関連する問題