|
|
|
|
@ -48,7 +48,6 @@ class PlayerDataFragment : EditableDataFragment(), StaticRowRepresentableDataSou |
|
|
|
|
player.updateValue(picture.absolutePath, PlayerRow.PLAYER_IMAGE) |
|
|
|
|
rowRepresentableAdapter.refreshRow(PlayerRow.PLAYER_IMAGE) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
override fun getDataSource(): RowRepresentableDataSource { |
|
|
|
|
@ -127,17 +126,20 @@ class PlayerDataFragment : EditableDataFragment(), StaticRowRepresentableDataSou |
|
|
|
|
placesArray.add(getString(R.string.library)) |
|
|
|
|
placesArray.add(getString(R.string.select_a_color)) |
|
|
|
|
|
|
|
|
|
if (player.picture != null) { |
|
|
|
|
if (player.hasPicture()) { |
|
|
|
|
placesArray.add(getString(R.string.remove_picture)) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
builder.setItems(placesArray.toTypedArray()) { dialog, which -> |
|
|
|
|
builder.setItems(placesArray.toTypedArray()) { _, which -> |
|
|
|
|
when (which) { |
|
|
|
|
0 -> mediaActivity?.openImageCaptureIntent(false) |
|
|
|
|
1 -> mediaActivity?.openImageGalleryIntent(false) |
|
|
|
|
2 -> { |
|
|
|
|
} |
|
|
|
|
3 -> player.updateValue(null, PlayerRow.PLAYER_IMAGE) |
|
|
|
|
3 -> { |
|
|
|
|
player.updateValue(null, PlayerRow.PLAYER_IMAGE) |
|
|
|
|
rowRepresentableAdapter.refreshRow(PlayerRow.PLAYER_IMAGE) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
builder.show() |
|
|
|
|
|